Clothes detection method and device, electronic equipment and storage medium

Through the methods of frame image division, image quality evaluation and feature iterative extraction of clothing videos, the problem of insufficient speed and accuracy of existing clothing detection methods is solved, and efficient and real-time response of automatic clothing detection is achieved.

CN119672319APending Publication Date: 2025-03-21NANJING YIMU INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510116459.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing clothing detection methods are low in speed and computing efficiency, difficult to achieve real-time response, and poor detection accuracy.

Method used

A clothing detection method is proposed, including obtaining the clothing video to be detected, frame image division, image quality evaluation, screening the target image sequence, and using the clothing detection model to iteratively extract the clothing features to determine the detection result.

Benefits of technology

Automatic clothing detection is realized, the accuracy and efficiency of detection is improved, real-time response can be achieved in multi-frame video scenes, and the detection effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672319A_ABST
    Figure CN119672319A_ABST
Patent Text Reader

Abstract

The invention discloses a clothes detection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a to-be-detected clothes video; performing frame image division on the to-be-segmented clothing video to obtain a video frame image sequence; performing image quality evaluation on the video frame image sequence, and screening out a target image sequence; and performing clothes feature iteration extraction on the target image sequence by using a clothes detection model, and determining a clothes detection result. The method can cope with a video multi-frame scene, realizes automatic detection of clothes, improves the accuracy and efficiency of clothes detection, improves the clothes detection effect, and can be widely applied to the technical field of image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a clothing detection method, device, electronic device and storage medium. Background Art

[0002] Clothing detection images can provide a good carrier for subsequent applications such as clothing fashion understanding and clothing management. In existing clothing detection methods, a segmentation model with multiple branches is usually used to integrate the segmentation results of clothing images, thereby introducing more parameters, resulting in slower speed and lower computational efficiency when segmenting clothing images. In addition, it is difficult to achieve real-time response when dealing with multi-frame video scenes, resulting in low accuracy of clothing detection and poor clothing detection effect. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a clothing detection method, device, electronic device and storage medium, which can realize automatic clothing detection and improve the accuracy and efficiency of clothing detection.

[0004] On the one hand, an embodiment of the present application provides a clothing detection method, the method comprising the following steps:

[0005] Get the video of the clothing to be tested;

[0006] Dividing the clothing video to be segmented into frames to obtain a video frame image sequence;

[0007] Performing image quality evaluation on the video frame image sequence and screening out a target image sequence;

[0008] The clothing detection model is used to iteratively extract clothing features from the target image sequence to determine a clothing detection result.

[0009] In some embodiments, the method further comprises:

[0010] Acquire a sample data set; the sample data set includes a plurality of clothing sample image combination sequences with clothing detection labels;

[0011] The clothing detection model is constructed, and the clothing detection model is trained and optimized using the sample data set.

[0012] In some embodiments, dividing the clothing video to be segmented into frames to obtain a video frame image sequence specifically includes:

[0013] Dividing the to-be-detected clothing video into frame images to obtain a video frame sequence and a video frame image corresponding to each video frame;

[0014] The video frame image sequence is determined according to the video frame sequence and each of the video frame images.

[0015] In some embodiments, performing image quality evaluation on the video frame image sequence to screen out the target image sequence specifically includes:

[0016] Calculating the image quality score of each of the video frame images;

[0017] Determining a plurality of first target images from the plurality of video frame images according to the image quality scores of the respective video frame images, wherein the image quality scores of the first target images are greater than a given image quality score threshold;

[0018] Performing image similarity calculation on the plurality of first target images to determine a plurality of second target images;

[0019] The target image sequence is determined according to the video frame sequence and each of the second target images.

[0020] In some embodiments, the clothing detection model includes a feature extraction module, a feature fusion module and a clothing segmentation module, and the use of the clothing detection model to iteratively extract clothing features from the target image sequence to determine the clothing detection result specifically includes:

[0021] Inputting the target image sequence into the feature extraction module to extract image features, and outputting feature extracted images corresponding to each of the second target images;

[0022] Inputting the feature extraction images corresponding to each of the second target images into the feature fusion module, and outputting the corresponding feature superposition images;

[0023] The feature superimposed image is input into a clothing segmentation module to perform clothing segmentation and output a corresponding clothing segmentation image.

[0024] In some embodiments, performing image similarity calculation on the plurality of first target images to determine the plurality of second target images specifically includes:

[0025] Sort the plurality of first target images according to the video frame sequence to determine an image sorting list;

[0026] The first target image ranked first in the image sorting list is obtained as the current target image, and the remaining first target images except the current target image in the image sorting list are obtained as the current comparison images;

[0027] Constructing an image similar combination and an image dissimilar combination corresponding to the current target image, obtaining the image similar combination as the current image similar combination, obtaining the image dissimilar combination as the current image dissimilar combination, and adding the current target image to the current image similar combination;

[0028] Calculating the current image similarity between the current target image and each of the current comparison images;

[0029] For each of the current comparison images, when the current image similarity between the current target image and the current comparison image is greater than a given image similarity threshold, the current comparison image is added to the current image similar combination; otherwise, the current comparison image is added to the current image dissimilar combination;

[0030] When the current image dissimilar combination contains at least two current comparison images, any one of the current comparison images in the current image dissimilar combination is obtained as the current target image, and the remaining current comparison images except the current target image in the current image dissimilar combination are obtained as the current comparison image, and then the process returns to the step of constructing the image similar combination and the image dissimilar combination corresponding to the current target image, obtaining the image similar combination as the current image similar combination, and obtaining the image dissimilar combination as the current image dissimilar combination, until the current image dissimilar combination contains at most one current comparison image;

[0031] When the current image dissimilar combination contains at most one current comparison image, the current comparison image contained in the current image dissimilar combination is obtained as the second target image, each image similar combination is obtained, and the second target image corresponding to each image similar combination is determined from each image similar combination, wherein the second target image corresponding to the image similar combination is the first target image with the highest image quality score in the image similar combination.

[0032] In some embodiments, the step of inputting the feature extraction images corresponding to each of the second target images into the feature fusion module and outputting the corresponding feature superposition images specifically includes:

[0033] Determine a target detection image from a plurality of second target images, determine each of the second target images except the target detection image as a target auxiliary image, and sort each of the target auxiliary images according to the video frame sequence to determine an auxiliary image sorting list;

[0034] The feature extraction image corresponding to the target detection image is obtained as the current detection image, and the target auxiliary image ranked first in the auxiliary image sorting list is obtained as the current auxiliary image;

[0035] Input the feature extraction images corresponding to the current detection image and the current auxiliary image into the feature fusion module, perform image feature superposition, and output the corresponding current feature superposition image;

[0036] When the current auxiliary image is not the target auxiliary image ranked last in the auxiliary image sorting list, the current feature superposition image is obtained as the current detection image, the target auxiliary image ranked one position after the current auxiliary image in the auxiliary image sorting list is obtained as the current auxiliary image, and then the step of returning to inputting the feature extraction images corresponding to the current detection image and the current auxiliary image into the feature fusion module, performing image feature superposition, and outputting the corresponding current feature superposition image is returned until the current auxiliary image is the target auxiliary image ranked last in the auxiliary image sorting list;

[0037] When the current auxiliary image is the target auxiliary image ranked last in the auxiliary image sorting list, the current feature superposition image and the feature extraction image corresponding to the target detection image are input into the feature fusion module to perform image feature superposition and output the feature superposition image.

[0038] On the other hand, an embodiment of the present application provides a clothing detection device, the device comprising:

[0039] The first module is used to obtain the video of the clothing to be detected;

[0040] The second module is used to divide the clothing video to be segmented into frames to obtain a video frame image sequence;

[0041] The third module is used to evaluate the image quality of the video frame image sequence and screen out the target image sequence;

[0042] The fourth module is used to iteratively extract clothing features from the target image sequence using a clothing detection model to determine a clothing detection result.

[0043] On the other hand, an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned clothing detection method when executing the computer program.

[0044] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the clothing detection method described above is implemented.

[0045] The embodiments of the present application include at least the following beneficial effects: The present application provides a clothing detection method, device, electronic device and storage medium, which obtains a video of clothing to be detected, divides the video of clothing to be segmented into frames, obtains a video frame image sequence, performs image quality evaluation on the video frame image sequence, screens out a target image sequence, and uses a clothing detection model to iteratively extract clothing features from the target image sequence to determine the clothing detection result. The present application can cope with multi-frame video scenes, realize automatic clothing detection, improve the accuracy and efficiency of clothing detection, and enhance the clothing detection effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a flow chart of a clothing detection method provided in an embodiment of the present application;

[0047] Figure 2 is a structural schematic diagram of a clothing detection model in an embodiment of the present application;

[0048] Figure 3 is a structural schematic diagram of a clothing detection device provided in an embodiment of the present application;

[0049] Figure 4 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0051] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0052] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0054] Reference Figure 1 , Figure 1 This is an optional flow chart of a clothing detection method provided in an embodiment of the present application. The method may include but is not limited to steps S101 to S104:

[0055] Step S101, obtaining a video of clothing to be detected;

[0056] Step S102, dividing the clothing video to be segmented into frames to obtain a video frame image sequence;

[0057] Step S103, performing image quality evaluation on the video frame image sequence and screening out the target image sequence;

[0058] Step S104, using the clothing detection model to iteratively extract clothing features from the target image sequence to determine the clothing detection result.

[0059] In step S102 of some embodiments, the video of the clothing to be detected is divided into frame images to obtain a video frame sequence and video frame images corresponding to each video frame. A video frame image sequence is determined based on the video frame sequence and each video frame image. Optionally, each video frame image is preprocessed, including image enhancement, image noise reduction, image standardization, etc.

[0060] In some embodiments, step S103 may include but is not limited to steps S201 to S204:

[0061] Step S201, calculating the image quality score of each video frame image;

[0062] Step S202, determining a plurality of first target images from the plurality of video frame images according to the image quality scores of the respective video frame images, wherein the image quality scores of the first target images are greater than a given image quality score threshold;

[0063] Step S203, performing image similarity calculation on the plurality of first target images to determine a plurality of second target images;

[0064] Step S204: determining a target image sequence according to the video frame sequence and each second target image.

[0065] In some embodiments, an image quality evaluation is performed on each video frame image to determine an image quality score corresponding to each video frame image. Optionally, the image quality score is associated with the image resolution.

[0066] In some embodiments, step S203 may include but is not limited to steps S301 to S307:

[0067] Step S301, sorting a plurality of first target images according to a video frame sequence to determine an image sorting list;

[0068] Step S302, obtaining the first target image ranked first in the image sorting list as the current target image, and obtaining the remaining first target images except the current target image in the image sorting list as the current comparison images;

[0069] Step S303, constructing image similarity combinations and image dissimilarity combinations corresponding to the current target image, obtaining image similarity combinations as the current image similarity combinations, obtaining image dissimilarity combinations as the current image dissimilarity combinations, and adding the current target image to the current image similarity combinations;

[0070] Step S304, calculating the current image similarity between the current target image and each current comparison image;

[0071] Step S305, for each current comparison image, when the current image similarity between the current target image and the current comparison image is greater than a given image similarity threshold, the current comparison image is added to the current image similar combination, otherwise, the current comparison image is added to the current image dissimilar combination;

[0072] Step S306, when the current image dissimilar combination includes at least two current comparison images, obtaining any current comparison image in the current image dissimilar combination as the current target image, obtaining the remaining current comparison images in the current image dissimilar combination except the current target image as the current comparison images, and then returning to step S303 until the current image dissimilar combination includes at most one current comparison image;

[0073] Step S307, when the current image dissimilar combination contains at most one current comparison image, obtain the current comparison image contained in the current image dissimilar combination as the second target image, obtain each image similar combination, and determine the second target image corresponding to each image similar combination from each image similar combination, wherein the second target image corresponding to the image similar combination is the first target image with the highest image quality score in the image similar combination.

[0074] In some embodiments, a plurality of first target images are compared one by one, and a number of first target images with low similarity are retained as the second target images.

[0075] Exemplarily, assuming that there are first target images h1 to h8, first, the first target image h1 is used as the current target image, and the first target images h2 to h8 are used as current contrast images, and an image similarity combination GL1 and an image dissimilar combination GX1 of the current target image h1 are constructed, and the image similarity combination GL1 is used as the current image similarity combination, and the image dissimilar combination GX1 is used as the current image dissimilar combination, and the current target image h1 is added to the current image similarity combination GL1, and the current image similarity between the current target image h1 and the current contrast images h2 to h8 is calculated, wherein it is determined that the current image similarity between the current target image h1 and the current contrast images h2 and the current contrast image h3 is greater than Image similarity threshold, add current contrast images h2 and h3 to the current image similar combination GL1, add current contrast images h4 to h8 to the current image dissimilar combination GX1, determine that the current image dissimilar combination GX1 contains at least two current contrast images, obtain any current contrast image in the current image dissimilar combination GX1, such as the current contrast image h4, and then use the current contrast image h4 as the current target image, and use the remaining current contrast images in the current image dissimilar combination GX1 except the current contrast image h4, that is, the current contrast images h5 to h8, as each current contrast image; construct the image similarity combination GL2 corresponding to the current target image h4 as the current image similarity combination, Construct the image dissimilar combination GX2 corresponding to the current target image h4 as the current image dissimilar combination, add the current target image h4 to the current image similarity combination GL2, calculate the current image similarity between the current target image h4 and the current contrast images h5 to h8, and determine that the current image similarities between the current target image h4 and the current contrast image h5, the current contrast image h6 and the current contrast image h7 are all greater than the image similarity threshold, so the current contrast images h5 to h7 are added to the current image similarity combination GL2, and the current contrast image h8 is added to the current image dissimilar combination GX2. At this time, it is determined that the current image dissimilar combination GX2 contains at most one current contrast image. First, , the current contrast image h8 contained in the current image dissimilar combination GX2 is determined as the second target image, and then, the image similarity combination GL1 and the image similarity combination GL2 are obtained. The image similarity combination GL1 includes the first target images h1, h2 and h3, and the image similarity combination GL2 includes the first target images h4, h5, h6 and h7. In the image similarity combination GL1, the image quality score of the first target image h2 is the highest, and the first target image h2 is determined as the second target image. In the image similarity combination GL2, the image quality score of the first target image h6 is the highest, and the first target image h6 is determined as the second target image. Finally, three second target images are obtained, namely h2, h6 and h8.

[0076] In some embodiments, reference Figure 2 , Figure 2 It is an optional structural diagram of a clothing detection model in an embodiment of the present application, and the clothing detection model includes a feature extraction module, a feature fusion module and a clothing segmentation module. Optionally, the clothing detection model is constructed based on a Transformer model, and the feature extraction module is constructed based on CNN (Convolutional Neural Network) for extracting model features. The feature fusion module is constructed based on the Decoder part of the Transformer's visual image architecture ViT, and is used to fuse two features for output. The clothing segmentation module is a high-level semantic feature fusion module constructed based on CNN, and is used to fuse features.

[0077] In some embodiments, step S104 may include but is not limited to steps S401 to S403:

[0078] Step S401, inputting the target image sequence into a feature extraction module, performing image feature extraction, and outputting feature extraction images corresponding to each second target image;

[0079] Step S402, inputting the feature extraction images corresponding to each second target image into a feature fusion module, and outputting the corresponding feature superposition image;

[0080] Step S403, inputting the feature superposition image into a clothing segmentation module, performing clothing segmentation, and outputting a corresponding clothing segmentation image.

[0081] In some embodiments, step S402 may include but is not limited to steps S501 to S505:

[0082] Step S501, determining a target detection image from a plurality of second target images, determining each second target image except the target detection image as a target auxiliary image, and performing image sorting on each target auxiliary image according to a video frame sequence to determine an auxiliary image sorting list;

[0083] Step S502, obtaining a feature extraction image corresponding to the target detection image as the current detection image, and obtaining the target auxiliary image ranked first in the auxiliary image sorting list as the current auxiliary image;

[0084] Step S503, inputting the feature extraction images corresponding to the current detection image and the current auxiliary image into the feature fusion module, performing image feature superposition, and outputting the corresponding current feature superposition image;

[0085] Step S504, when the current auxiliary image is not the target auxiliary image ranked last in the auxiliary image sorting list, the current feature superposition image is obtained as the current detection image, the target auxiliary image ranked one position after the current auxiliary image in the auxiliary image sorting list is obtained as the current auxiliary image, and then the process returns to the step of inputting the feature extraction images corresponding to the current detection image and the current auxiliary image into the feature fusion module, performing image feature superposition, and outputting the corresponding current feature superposition image, until the current auxiliary image is the target auxiliary image ranked last in the auxiliary image sorting list;

[0086] Step S505, when the current auxiliary image is the target auxiliary image ranked last in the auxiliary image sorting list, the feature extraction image corresponding to the current feature superposition image and the target detection image is input into the feature fusion module to perform image feature superposition and output the feature superposition image.

[0087] In some embodiments, the second target image with the highest image quality score is selected as the target detection image, and the remaining second target images are used as target auxiliary images. The target auxiliary images are sorted to obtain a sorted auxiliary image list, and a feature fusion module is used to perform feature superposition based on the feature extraction image corresponding to the target detection image, the feature extraction images corresponding to each target auxiliary image, and the sorted auxiliary image list to output a feature superposition image.

[0088] For example, assuming that there are second target images x1 to x8, and the image quality score of the second target image x5 is the highest, the second target image x5 is determined as the target detection image, and the second target images x1 to x4 and the second target images x6 to x8 are all determined as target auxiliary images, and the corresponding auxiliary image sorting list is obtained: x1-x2-x3-x4-x6-x7-x8. First, the feature extraction image corresponding to the target detection image x5 is used as the current detection image, and the second target image x1 is used as the current auxiliary image. The feature extraction images corresponding to the current detection image x5 and the current auxiliary image x1 are input to the output image. The feature fusion module is input to perform image feature superposition, and the corresponding current feature superposition image A1 is output. Then, the current feature superposition image A1 is determined as the current detection image, and the second target image x2 is used as the current auxiliary image. The feature fusion module is used to perform image feature superposition on the feature extraction images corresponding to the current detection image A1 and the current auxiliary image x2, and the corresponding current feature superposition image A2 is output. This is repeated multiple times until the current auxiliary image is determined to be the second target image x8 and the feature fusion module has been used to complete the image feature superposition of the current time according to the current auxiliary image, and the corresponding current feature superposition image A is output. N , then, superimpose the current feature image A NThe feature extraction image corresponding to the target detection image x5 is input into the feature fusion module for the final image feature superposition, and the corresponding feature superposition image A is output.

[0089] In some embodiments, the clothing detection method may further include steps S601 to S602:

[0090] Step S601, obtaining a sample data set; the sample data set includes a plurality of clothing sample image combination sequences with clothing detection labels;

[0091] Step S602: construct a clothing detection model, and use the sample data set to train and optimize the clothing detection model.

[0092] In some embodiments, a sample data set is divided to obtain a training set and a test set, the training set is used to train and optimize the clothing detection model, the test set is used to perform model evaluation on the trained clothing detection model, and it is determined whether to continue training the clothing detection model. Optionally, the test set is input into the clothing detection model, and the clothing detection model is used to output clothing segmentation results. The clothing detection model is evaluated according to a number of preset model evaluation indicators and clothing detection results, and the model training evaluation value corresponding to each model evaluation indicator is determined. According to the model training evaluation value corresponding to each model evaluation indicator, it is determined whether to continue training the clothing detection model and obtain the evaluation threshold corresponding to each model evaluation indicator. When the model training evaluation value corresponding to each model evaluation indicator exceeds the evaluation threshold corresponding to each model evaluation indicator, the clothing detection model training is stopped. Otherwise, the clothing detection model training is continued. Optionally, the model evaluation indicators may include but are not limited to precision, recall rate, F1 value, AUC value, etc.

[0093] Reference Figure 3 , Figure 3 : is an optional structural diagram of a clothing detection device provided in an embodiment of the present application. The device is used to implement the above clothing detection method. The device may include:

[0094] The first module is used to obtain the video of the clothing to be detected;

[0095] The second module is used to divide the clothing video to be segmented into frames to obtain a video frame image sequence;

[0096] The third module is used to evaluate the image quality of the video frame image sequence and screen out the target image sequence;

[0097] The fourth module is used to iteratively extract clothing features from the target image sequence using the clothing detection model to determine the clothing detection result.

[0098] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0099] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above clothing detection method when executing the computer program. The electronic device can be any smart terminal including a tablet computer.

[0100] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0101] See also Figure 4 , Figure 4 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0102] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0103] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the clothing detection method of the embodiment of this application;

[0104] Input / output interface 903, used to implement information input and output;

[0105] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0106] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0107] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0108] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned clothing detection method is implemented.

[0109] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0110] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0111] The embodiments of the present application provide a clothing detection method, device, electronic device, and storage medium, which obtain a video of clothing to be detected, perform frame image division on the clothing video to be segmented, obtain a video frame image sequence, perform image quality evaluation on the video frame image sequence, screen out a target image sequence, and use a clothing detection model to iteratively extract clothing features from the target image sequence to determine the clothing detection result. The embodiments of the present application can cope with multi-frame video scenes, realize automatic clothing detection, improve the accuracy and efficiency of clothing detection, and enhance the clothing detection effect.

[0112] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0113] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0114] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0115] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0116] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0117] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0118] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0119] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0121] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose.

[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0123] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A clothing detection method, characterized in that: The method comprises the following steps: Get the video of the clothing to be tested; Dividing the clothing video to be segmented into frames to obtain a video frame image sequence; Performing image quality evaluation on the video frame image sequence and screening out a target image sequence; The clothing detection model is used to iteratively extract clothing features from the target image sequence to determine a clothing detection result.

2. The clothing detection method according to claim 1, characterized in that: The method further comprises: Acquire a sample data set; the sample data set includes a plurality of clothing sample image combination sequences with clothing detection labels; construct the clothing detection model, and use the sample data set to train and optimize the clothing detection model.

3. The clothing detection method according to claim 1, characterized in that: The step of dividing the clothing video to be segmented into frames to obtain a video frame image sequence specifically includes: Dividing the to-be-detected clothing video into frame images to obtain a video frame sequence and a video frame image corresponding to each video frame; The video frame image sequence is determined according to the video frame sequence and each of the video frame images.

4. The clothing detection method according to claim 3, characterized in that: The performing image quality evaluation on the video frame image sequence to screen out the target image sequence specifically includes: Calculating the image quality score of each of the video frame images; Determining a plurality of first target images from the plurality of video frame images according to the image quality scores of the respective video frame images, wherein the image quality scores of the first target images are greater than a given image quality score threshold; Performing image similarity calculation on the plurality of first target images to determine a plurality of second target images; The target image sequence is determined according to the video frame sequence and each of the second target images.

5. The clothing detection method according to claim 4, characterized in that: The clothing detection model includes a feature extraction module, a feature fusion module and a clothing segmentation module. The clothing detection model is used to iteratively extract clothing features from the target image sequence to determine the clothing detection result, specifically including: Inputting the target image sequence into the feature extraction module to extract image features, and outputting feature extracted images corresponding to each of the second target images; Inputting the feature extraction images corresponding to each of the second target images into the feature fusion module, and outputting the corresponding feature superposition images; The feature superimposed image is input into a clothing segmentation module to perform clothing segmentation and output a corresponding clothing segmentation image.

6. The clothing detection method according to claim 4, characterized in that: The performing image similarity calculation on the plurality of first target images to determine the plurality of second target images specifically includes: Sort the plurality of first target images according to the video frame sequence to determine an image sorting list; The first target image ranked first in the image sorting list is obtained as the current target image, and the remaining first target images except the current target image in the image sorting list are obtained as the current comparison images; Constructing an image similar combination and an image dissimilar combination corresponding to the current target image, obtaining the image similar combination as the current image similar combination, obtaining the image dissimilar combination as the current image dissimilar combination, and adding the current target image to the current image similar combination; Calculating the current image similarity between the current target image and each of the current comparison images; For each of the current comparison images, when the current image similarity between the current target image and the current comparison image is greater than a given image similarity threshold, the current comparison image is added to the current image similar combination; otherwise, the current comparison image is added to the current image dissimilar combination; When the current image dissimilar combination contains at least two current comparison images, any one of the current comparison images in the current image dissimilar combination is obtained as the current target image, and the remaining current comparison images except the current target image in the current image dissimilar combination are obtained as the current comparison image, and then the process returns to the step of constructing the image similar combination and the image dissimilar combination corresponding to the current target image, obtaining the image similar combination as the current image similar combination, and obtaining the image dissimilar combination as the current image dissimilar combination, until the current image dissimilar combination contains at most one current comparison image; When the current image dissimilar combination contains at most one current comparison image, the current comparison image contained in the current image dissimilar combination is obtained as the second target image, each image similar combination is obtained, and the second target image corresponding to each image similar combination is determined from each image similar combination, wherein the second target image corresponding to the image similar combination is the first target image with the highest image quality score in the image similar combination.

7. The clothing detection method according to claim 5, characterized in that: The step of inputting the feature extraction images corresponding to each of the second target images into the feature fusion module and outputting the corresponding feature superposition images specifically includes: Determine a target detection image from a plurality of second target images, determine each of the second target images except the target detection image as a target auxiliary image, and sort each of the target auxiliary images according to the video frame sequence to determine an auxiliary image sorting list; The feature extraction image corresponding to the target detection image is obtained as the current detection image, and the target auxiliary image ranked first in the auxiliary image sorting list is obtained as the current auxiliary image; Input the feature extraction images corresponding to the current detection image and the current auxiliary image into the feature fusion module, perform image feature superposition, and output the corresponding current feature superposition image; When the current auxiliary image is not the target auxiliary image ranked last in the auxiliary image sorting list, the current feature superposition image is obtained as the current detection image, the target auxiliary image ranked one position after the current auxiliary image in the auxiliary image sorting list is obtained as the current auxiliary image, and then the step of returning to inputting the feature extraction images corresponding to the current detection image and the current auxiliary image into the feature fusion module, performing image feature superposition, and outputting the corresponding current feature superposition image is returned until the current auxiliary image is the target auxiliary image ranked last in the auxiliary image sorting list; When the current auxiliary image is the target auxiliary image ranked last in the auxiliary image sorting list, the current feature superposition image and the feature extraction image corresponding to the target detection image are input into the feature fusion module to perform image feature superposition and output the feature superposition image.

8. A clothing detection device, characterized in that: The device comprises: The first module is used to obtain the video of the clothing to be detected; The second module is used to divide the clothing video to be segmented into frames to obtain a video frame image sequence; The third module is used to evaluate the image quality of the video frame image sequence and screen out the target image sequence; The fourth module is used to iteratively extract clothing features from the target image sequence using a clothing detection model to determine a clothing detection result.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the clothing detection method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the clothing detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Federal learning-based edge end model updating method and device, equipment and medium

    CN120124781A

  • Edge - side Model Update Method, Device, Equipment and Medium Based on Federated Learning

    CN120124781B