Clothes identification method and device, equipment and medium

Through the clothing recognition method, the detection model and type recognition model are used to classify and identify images, which solves the errors and inefficiency problems caused by manual participation in traditional laundry services, and realizes the accurate identification and efficient classification of clothing brands and defects.

CN119006874AActive Publication Date: 2024-11-22SHENZHEN HIVE BOX NETWORK TECH LTD

Patent Information

Application Number
CN202410817140.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-11-22
Estimated Expiration
2044-06-21

AI Technical Summary

Technical Problem

Manual participation is required in the traditional laundry service industry, resulting in high experience requirements, prone to errors and low efficiency.

Method used

Using the clothing recognition method, the image classification and recognition of the images to be identified through the detection model is obtained, the classification detection results, brand detection results and defect detection results are obtained, and the clothing image is recognized through the type recognition model, the style and color recognition results are obtained, and the clothing recognition is finally determined. result.

Benefits of technology

It improves the accuracy of clothing brand and defect recognition, improves classification efficiency and the accuracy of style and color recognition, and reduces manual errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006874A_ABST
    Figure CN119006874A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of clothes recognition, and discloses a clothes recognition method, device and equipment and a medium, and the method comprises the steps: obtaining at least one to-be-recognized image corresponding to to-be-recognized clothes, and carrying out the image classification recognition of all to-be-recognized images through a detection model, a classification detection result, a brand detection result and a defect detection result are obtained; performing clothes image recognition on all the to-be-recognized images through a type recognition model corresponding to the classification detection result to obtain a style recognition result and a color recognition result; and according to the brand detection result, the style identification result, the color identification result and the defect detection result, determining a clothes identification result corresponding to the to-be-identified clothes. According to the invention, the clothes image is identified through the model, the classification of the clothes is realized, and the accurate identification of the clothes color and the clothes style is realized, so that the identification accuracy of the clothes brand and the clothes defect is improved, and the classification efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of clothing recognition, and in particular to a clothing recognition method, device, equipment and medium. Background Art

[0002] In the traditional laundry service industry, after a user goes to a laundry shop, he needs to communicate with the laundry staff and place an order. The staff will then sort the clothes, or pack them and send them to the laundry factory, or wash them in the store. The whole process requires manual participation and requires high experience. If the staff is inexperienced, it will not only lead to errors (for example, incorrect classification of clothes), but also lead to low efficiency. Summary of the invention

[0003] Embodiments of the present invention provide a clothing identification method, device, equipment and medium to solve the problem in the prior art that the laundry service industry requires high manual experience, which leads to easy errors and low efficiency.

[0004] A clothing recognition method, comprising:

[0005] Acquire at least one image to be identified corresponding to the clothing to be identified, and perform image classification and recognition on all the images to be identified through a detection model to obtain classification detection results, brand detection results, and defect detection results corresponding to the clothing to be identified;

[0006] Perform clothing image recognition on all the images to be recognized by using a type recognition model corresponding to the classification detection result to obtain a style recognition result and a color recognition result;

[0007] A clothing recognition result corresponding to the clothing to be recognized is determined according to the brand detection result, the style recognition result, the color recognition result and the defect detection result.

[0008] A clothing identification device, comprising:

[0009] An image classification and recognition module is used to obtain at least one image to be recognized corresponding to the clothing to be recognized, and perform image classification and recognition on all the images to be recognized through a detection model to obtain classification detection results, brand detection results and defect detection results corresponding to the clothing to be recognized;

[0010] A clothing image recognition module, used to perform clothing image recognition on all the images to be recognized by using a type recognition model corresponding to the classification detection result, and obtain a style recognition result and a color recognition result;

[0011] The clothing recognition result module is used to determine the clothing recognition result corresponding to the clothing to be recognized based on the brand detection result, the style recognition result, the color recognition result and the defect detection result.

[0012] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the above-mentioned clothing identification method.

[0013] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the clothing identification method is implemented.

[0014] The above-mentioned clothing recognition method, device, equipment and medium, the clothing recognition method of the present invention classifies and recognizes all images to be recognized through the detection model, realizes accurate recognition of classification detection results, brand detection results and defect detection results, thereby improving the recognition accuracy of clothing brands and clothing defects, and improving classification efficiency. Through the type recognition model corresponding to the classification detection result, all images to be recognized are subjected to clothing image recognition, and the style and color of clothing are accurately recognized, and the style recognition results and color recognition results are obtained, thereby improving the recognition accuracy of clothing styles and clothing colors. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0016] Figure 1 is a flow chart of a clothing identification method according to an embodiment of the present invention;

[0017] Figure 2 is a flow chart of step S10 of a clothing identification method according to an embodiment of the present invention;

[0018] Figure 3 is a flow chart of step S101 of a clothing identification method in one embodiment of the present invention;

[0019] Figure 4 is a flow chart of step S102 of the clothing identification method in one embodiment of the present invention;

[0020] Figure 5 is a flow chart of step S20 of the clothing identification method in one embodiment of the present invention;

[0021] Figure 6is a flow chart of step S201 of a clothing identification method in one embodiment of the present invention;

[0022] Figure 7 is a flow chart of step S103 of the clothing identification method in one embodiment of the present invention;

[0023] Figure 8 It is a principle block diagram of a clothing identification device in one embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In one embodiment, if Figure 1 As shown, a clothing identification method is provided, comprising the following steps:

[0026] S10: Acquire at least one image to be identified corresponding to the clothing to be identified, and perform image classification and recognition on all the images to be identified through a detection model to obtain classification detection results, brand detection results, and defect detection results corresponding to the clothing to be identified.

[0027] Understandably, the image to be identified refers to the picture taken of the clothing. The clothing to be identified refers to the clothes or pants received and need to be washed. The classification detection result refers to the result of identifying the type of clothing, for example, tops, trousers or shoes. The brand detection result refers to the result of identifying the brand of the clothing. The defect detection result refers to the result of identifying the damage or stains on the clothing. The detection model is obtained by training the yolov8 network or the yolov8 improved network with the corresponding image data.

[0028] Specifically, after receiving the clothing to be identified, the front and back and the inside and outside of the clothing to be identified are photographed respectively through two groups of lenses, one for each of long and short distances, so as to obtain at least one image to be identified corresponding to the clothing to be identified. Then, multiple detection models that have been trained are obtained, namely, a classification detection model, a brand detection model and a defect detection model, and all the images to be identified corresponding to the clothing to be identified are input into different detection models, and image classification and recognition are performed on all the images to be identified through different detection models, that is, classification detection is performed on all the images to be identified through the classification detection model to obtain classification detection results, brand detection is performed on all the images to be identified through the brand detection model to obtain brand detection results, and defect detection is performed on all the images to be identified through the defect detection model to obtain defect detection results. In this way, the classification detection results, brand detection results and defect detection results of the clothing to be identified can be obtained.

[0029] Among them, the defect detection model adopts the same network structure as the brand detection model, and uses different training samples in the training model so that the model recognizes different contents. The processing process of the defect detection model will not be described in detail. The defect detection model outputs the predicted probability for each area, and determines the area with a higher probability as a defect, thereby obtaining the defect detection result corresponding to the clothing to be identified.

[0030] S20: performing clothing image recognition on all the images to be recognized through a type recognition model corresponding to the classification detection result to obtain a style recognition result and a color recognition result.

[0031] Understandably, the type recognition model refers to the training of the EfficientNet network by the corresponding type image. The style recognition result refers to the style of the clothing to be recognized, for example, top style: down jacket, windbreaker, denim jacket, leather jacket, suit, sweater, vest, shirt, etc.; shoe style: leather shoes, casual shoes, canvas shoes, sports shoes, sandals, cotton shoes, slippers, etc.; trousers and skirt styles: dresses, short skirts, skirts, jeans, shorts, jumpsuits, down pants, etc.; home styles: sheets, quilts, towels, cushions, etc. The color recognition result refers to the color of the clothing to be recognized, for example, white, black, blue, red or a combination of colors.

[0032] Specifically, the type of clothing to be identified is determined by the classification detection result, and the type recognition model corresponding to the type is obtained by the type, for example, a top recognition model, a trouser skirt recognition model, a shoe recognition model, and a home recognition model. Then, the image to be identified is preprocessed, that is, the corresponding image to be identified is cropped by the detection frame corresponding to the clothing to be identified output by the classification detection model, so as to obtain a target image including only clothing; then, clothing image recognition is performed on all images to be identified by the type recognition model corresponding to the classification detection result, that is, the style and color corresponding to each image to be identified are identified, and the style and color of all results corresponding to the same clothing to be identified are determined, so as to obtain style recognition results and color recognition results. Among them, it can be understood that the detection model outputs the detection frame corresponding to the category and clothing, the detection frame corresponding to the brand and logo, and the detection frame corresponding to the defect and the defect.

[0033] S30: Determine a clothing recognition result corresponding to the clothing to be recognized based on the brand detection result, the style recognition result, the color recognition result, and the defect detection result.

[0034] Understandably, the clothing recognition result is used to characterize the brand, style and defect of the clothing to be recognized.

[0035] Specifically, after the color and style are identified, information of the clothing to be identified is recorded through brand detection results, style recognition results, color recognition results and defect detection results, thereby obtaining a document including the color, style, brand and defects of the clothing to be identified, that is, the clothing identification result corresponding to the clothing to be identified.

[0036] In the clothing recognition method of the present invention, all images to be recognized are classified and recognized through the detection model, and accurate recognition of classification detection results, brand detection results and defect detection results is achieved, thereby improving the recognition accuracy of clothing brands and clothing defects and improving classification efficiency. Clothing image recognition is performed on all images to be recognized through the type recognition model corresponding to the classification detection result, and accurate recognition of clothing styles and colors is achieved, and style recognition results and color recognition results are obtained, thereby improving the recognition accuracy of clothing styles and clothing colors.

[0037] In one embodiment, if Figure 2 As shown, in step S10, the detection model is used to perform image classification and recognition on all the images to be recognized, and a classification detection result, a brand detection result and a defect detection result corresponding to the clothing to be recognized are obtained, and the detection model includes a classification detection model, a brand detection model and a defect detection model; including:

[0038] S101, performing classification detection on all the images to be identified by using the classification detection model to obtain classification detection results corresponding to the clothing to be identified.

[0039] S102, performing brand detection on all the images to be identified by using the brand detection model to obtain brand detection results corresponding to the clothing to be identified.

[0040] S103, performing defect detection on all the images to be identified by using the defect detection model to obtain defect detection results corresponding to the clothing to be identified.

[0041] Understandably, the classification detection result is used to characterize the category of the clothing to be identified, such as tops and pants, etc. The brand detection result is used to characterize the brand of the clothing to be identified, such as Xtep, Li Ning or Puma, etc. The defect detection result is used to characterize whether the clothing to be identified has stains or damage, etc.

[0042] Specifically, after obtaining the image to be identified, a classification detection model, a brand detection model and a defect detection model are obtained, and all the images to be identified are input into the classification detection model, the brand detection model and the defect detection model respectively. Then, all the images to be identified are classified and detected by the classification detection model, that is, all the images to be identified are classified and identified by the yolov8 model, that is, all the images to be identified are detected by the classification ability learned by the classification detection model during training, so as to obtain the detection frame corresponding to the clothes in the image to be identified and the classification detection result corresponding to the clothes. Similarly, all the images to be identified are detected by the brand detection model, that is, brand identification is performed on all the images to be identified by the yolov8 model, and the border detection of the logos in all the images to be identified is performed by the recognition ability learned by the brand detection model during training, so as to obtain the detection frame corresponding to the logo on the clothes and the brand detection result. Furthermore, defect detection is performed on all images to be identified through the defect detection model, that is, defect recognition is performed on all images to be identified through the yolov8 model, and defects in all images to be identified are detected by the recognition ability learned by the defect detection model during training, so as to obtain detection frames corresponding to defects on the clothes and defect detection results.

[0043] In this embodiment, classification detection is performed on all images to be identified through the classification detection model, so that the category of the clothing to be identified is determined, and the classification detection result is obtained. Brand detection is performed on all images to be identified through the brand detection model, so that the brand of the clothing to be identified is determined, and the brand detection result is obtained. Defect detection is performed on all images to be identified through the defect detection model, so that the defect position in the clothing to be identified is determined, and the defect detection result is obtained.

[0044] In one embodiment, if Figure 3 As shown, in step S101, the classification detection model is used to perform classification detection on all the images to be identified, and the classification detection results corresponding to the clothing to be identified are obtained, including:

[0045] S1011, extracting features of different scales from all the images to be identified through the first backbone network in the classification detection model to obtain first extracted features.

[0046] S1012, performing feature fusion of different dimensions on all the first extracted features through the Neck network in the classification detection model to obtain a first fused feature.

[0047] S1013, predicting and processing all the first fusion features through the first recognition network in the classification detection model to obtain a classification detection result.

[0048] Understandably, the classification detection model refers to a model for classifying clothing types, which is obtained by training based on the yolov8 network. The first extracted feature refers to features extracted at different scales. The first fused feature refers to features fused at different dimensions.

[0049] Specifically, after obtaining the image to be identified, a classification detection model is obtained, and all the images to be identified are input into the classification detection model. The first backbone network in the classification detection model is used to extract features of the image to be identified, that is, the image to be identified is convolved through the two-dimensional convolution, normalization and SiLU activation function in the convolution module to reduce the dimension and enhance the nonlinear ability, thereby obtaining the first convolution feature. Then, the first convolution feature is extracted through the C2f module, that is, the number of channels is first reduced, and then the features are extracted through the first convolution, and the input and output are spliced ​​using the residual connection, and finally the number of channels is restored to obtain the first extracted feature. Then, the first extracted features of different scales are extracted through the convolution module and the C2f module. Among them, after the last layer of convolution modules and C2f modules, the first extracted features of the previous dimension are continuously pooled multiple times and residually connected through the SPPF module, thereby obtaining the first extracted features of different scales.

[0050] Furthermore, the Neck network in the classification detection model is used to perform feature fusion processing on the first extracted features of different scales, that is, the first extracted features of the last dimension are fused with the first extracted features of the previous dimension after upsampling to obtain the first feature, and the first feature is fused with the first extracted features of the previous dimension after passing through the C2f layer and upsampling to obtain the first dimension feature. The first dimension feature is fused with the first feature through the convolution layer to obtain the second feature, the second feature is passed through the C2f layer to obtain the second dimension feature, the second dimension feature is fused with the first extracted feature of the last dimension through the convolution layer to obtain the third feature, the third feature is passed through the C2f layer to obtain the third dimension feature, and the three dimensional features are determined as the first fused feature.

[0051] Next, the first fusion feature is input into the first recognition network of the classification detection model, and the first recognition network is used to predict the image of each dimension feature in the first fusion feature, that is, the detect layer is used to predict the category of each dimension feature, and the threshold is filtered to eliminate the prediction results with low confidence, and non-maximum suppression is used to eliminate redundant categories, so as to obtain the classification detection result corresponding to the image to be identified. Among them, the working principle of non-maximum suppression is: for each target category, the category with the highest confidence is selected as a reference, and only the most likely category is retained.

[0052] In this embodiment, the first backbone network is used to extract features of different scales in the image to be identified, and the first extracted feature is determined. The Neck network is used to fuse features of different dimensions, and the first fused feature is determined. The first recognition network is used to identify the first fused feature, and the classification detection result is obtained, thereby improving the accuracy of clothing classification.

[0053] In one embodiment, if Figure 4 As shown, in step S102, brand detection is performed on all the images to be identified by the brand detection model to obtain brand detection results corresponding to the clothing to be identified, including:

[0054] S1021, extracting features of different scales from all the images to be identified through the second backbone network in the brand detection model to obtain second extracted features.

[0055] S1022, performing feature fusion of different dimensions on all the second extracted features through the BiFPN network in the brand detection model to obtain second fused features.

[0056] S1023: Perform prediction processing on all the second fusion features through the second recognition network in the brand detection model to obtain a brand detection result.

[0057] It can be understood that the brand detection model refers to a model used to identify clothing brands, which is improved based on the yolov8 network.

[0058] Specifically, after obtaining the image to be recognized, the brand detection model is obtained, and all the images to be recognized are input into the brand detection model. The image to be recognized is subjected to feature extraction through the second backbone network in the brand detection model, that is, the image to be recognized is subjected to convolution processing through the two-dimensional convolution, normalization and SiLU activation function in the convolution module to reduce the dimension and enhance the nonlinear ability, thereby obtaining the second convolution feature. Then, the second convolution feature is subjected to feature extraction through the C2f module, that is, the number of channels is first reduced, and then the feature is extracted through the second convolution, and the input and output are spliced ​​using the residual connection, and finally the number of channels is restored, thereby obtaining the second extracted feature. Then, the second extracted features of different scales are extracted through the second convolution module and the C2f module. Among them, after the last layer of convolution modules and C2f modules, the second extracted features of the previous dimension are subjected to multiple consecutive maximum pooling and residual connections through the SPPF module, thereby obtaining the second extracted features of different scales.

[0059] Furthermore, the BiFPN network in the brand detection model is used to perform feature fusion of different dimensions on all the second extracted features, that is, the extracted features of the second, third, fourth and fifth layers in the second backbone network are fused through top-down and bottom-up information exchange paths, and the top-down information exchange paths are fused in the third and fourth layers, and the information of the fused upper layer features is fused with the feature of the layer and the bottom-up lower layer through jump connections to obtain the second fused features.

[0060] In a specific embodiment, the extracted features of p2, p3, p4 and p5 extracted by the second backbone network are obtained, and the extracted features of p4 and p5 are fused in the first p4 fusion layer (i.e., only the middle two layers include the fusion layer) to obtain the first fused feature of p4, and the first fused feature of p4 is transferred to the second p4 fusion layer and the first p3 fusion layer, and the first fused feature of p4 and the extracted features of p3 are fused in the first p3 fusion layer to obtain the first fused feature of p3, and the features are transferred to the second p3 fusion layer and the second p2 fusion layer. In the second p2 fusion layer, the extracted features of p2 and the first fused features of p3 are fused to obtain the second fused features of p2, and the features are transferred to the second recognition network and the second p3 fusion layer. In the second p3 fusion layer, the second fused features of p2, the first fused features of p3 and the extracted features of p3 transferred by jumping are fused to obtain the second fused features of p3, and the features are transferred to the second recognition network and the second p4 fusion layer. In the second p4 fusion layer, the p3 second fusion feature, the p4 first fusion feature and the p4 extracted feature transferred by jump are fused to obtain the p4 second fusion feature, and the p4 second fusion feature is transferred to the second recognition network and the second p5 fusion layer. In the second p5 fusion layer, the p5 extracted feature and the p4 second fusion feature are fused to obtain the p5 second fusion feature, and transferred to the second recognition network.

[0061] Next, the second fusion feature is input into the second recognition network of the brand detection model, and the second recognition network performs image prediction on each dimension feature in the second fusion feature, that is, the detect layer performs brand prediction on each dimension feature, and threshold filtering is performed to eliminate low-confidence prediction results, and non-maximum suppression is performed to eliminate redundant brands, thereby obtaining the brand detection result corresponding to the image to be identified. Among them, the working principle of non-maximum suppression is: for each target brand, the brand with the highest confidence is selected as a reference, and only the most likely brand is retained.

[0062] In this embodiment, the second backbone network is used to extract features of different scales in the image to be identified, and the second extracted features are determined. The BiFPN network is used to fuse features of different dimensions, determine the second fused features, and fuse low-dimensional features. The second recognition network is used to recognize the second fused features, obtain brand detection results, and thus improve the accuracy of clothing brand recognition.

[0063] In one embodiment, if Figure 5As shown, in step S20, the type recognition model corresponding to the classification detection result is used to perform clothing image recognition on all the images to be recognized, and obtains style recognition results and color recognition results, and the type recognition model includes a top recognition model, a trouser skirt recognition model, a shoe recognition model and a home recognition model; including:

[0064] S201, when the classification detection result indicates that the clothing to be identified is a top, performing image recognition on all the images to be identified by using the top recognition model to obtain a top color recognition result and a top style recognition result.

[0065] S202, when the classification detection result indicates that the clothing to be identified is a culottes, image recognition is performed on all the images to be identified using the culottes recognition model to obtain a culottes color recognition result and a culottes style recognition result.

[0066] S203, when the classification detection result indicates that the clothing to be identified is a shoe, image recognition is performed on all the images to be identified by using the shoe recognition model to obtain a shoe color recognition result and a shoe style recognition result.

[0067] S204, when the classification detection result indicates that the clothing to be identified is home furnishings, image recognition is performed on all the images to be identified using the home furnishings recognition model to obtain home furnishings color recognition results and home furnishings style recognition results.

[0068] Understandably, the top color recognition result refers to the color result identified when the clothing to be identified is a top, for example, white, black, or a combination of colors, such as blue and white. The top style recognition result refers to the style result identified when the clothing to be identified is a top, for example, down jackets, windbreakers, denim jackets, leather jackets, suits, sweaters, vests, shirts, etc. The culottes color recognition result refers to the color result identified when the clothing to be identified is a culottes, for example, white, black, or a combination of colors, such as gray and white. The culottes style recognition result refers to the style result identified when the clothing to be identified is a culottes, for example, dresses, short skirts, skirts, jeans, shorts, jumpsuits, down pants, etc. The shoe color recognition result refers to the color result identified when the clothing to be identified is a shoe, for example, black, white, brown or gray, or a combination of colors. The shoe style recognition result refers to the style result identified when the clothing to be identified is a shoe, for example, leather shoes, casual shoes, canvas shoes, sports shoes, sandals, cotton shoes, slippers, etc. The home color recognition result refers to the color result when the clothing to be identified as home, for example, black, white, brown or gray, or a combination of colors. The home style recognition result refers to the style result when the clothing to be identified as home, for example, bed sheets, quilts, towels, cushions, etc. The top recognition model, trousers and skirt recognition model, shoe recognition model and home recognition model are all obtained by training the EfficientNet network with different training data. Among them, the network structure of the category recognition model can be the same, or the recognition model can be obtained by training different network structures.

[0069] Specifically, after obtaining the classification test result, when the classification test result indicates that the clothing to be identified is a top, the top recognition model is obtained, and image recognition is performed on all the images to be identified through the top recognition model, that is, the color and style of the top in the image to be identified are recognized through the top recognition model, that is, the color and style of the top are recognized through the recognition ability learned during training, and the results are integrated and confirmed according to the recognition results of all the images to be identified, so as to obtain the top color recognition result and the top style recognition result corresponding to the clothing to be identified. Similarly, when the classification test result indicates that the clothing to be identified is a culottes, the culottes recognition model is obtained, and image recognition is performed on all the images to be identified through the culottes recognition model, that is, the color and style of the culottes in the image to be identified are recognized through the culottes recognition model, that is, the color and style of the culottes are recognized through the recognition ability learned during training, and the results are integrated and confirmed according to the recognition results of all the images to be identified, so as to obtain the culottes color recognition result and the culottes style recognition result corresponding to the clothing to be identified. Furthermore, when the classification detection result indicates that the clothing to be identified is a shoe, a shoe recognition model is obtained, and image recognition is performed on all images to be identified through the shoe recognition model, that is, the color and style of the shoes in the image to be identified are identified through the shoe recognition model, that is, the color and style of the shoes are identified through the recognition ability learned during training, and the results are integrated and confirmed based on the recognition results of all images to be identified, so as to obtain the shoe color recognition results and shoe style recognition results corresponding to the clothing to be identified. Similarly, when the classification detection result indicates that the clothing to be identified is a home furnishing, a home furnishing recognition model is obtained, and image recognition is performed on all images to be identified through the home furnishing recognition model, that is, the color and style of the home furnishings in the image to be identified are identified through the home furnishing recognition model, that is, the color and style of the home furnishings are identified through the recognition ability learned during training, and the results are integrated and confirmed based on the recognition results of all images to be identified, so as to obtain the home furnishing color recognition results and home furnishing style recognition results corresponding to the clothing to be identified.

[0070] In this embodiment, by determining the category represented by the classification detection result, it is possible to obtain a recognition model corresponding to the category, and the clothing to be identified is identified by the recognition model corresponding to the category, thereby realizing the recognition of the color and style of the clothing to be identified, thereby improving the accuracy of color recognition and style recognition, and further improving the efficiency of classification.

[0071] In one embodiment, if Figure 6 As shown, in step S202, the top recognition model is used to perform image recognition on all the images to be recognized, and a top color recognition result and a top style recognition result are obtained, including:

[0072] S2021, performing convolution processing on all the images to be recognized through the convolution network in the top recognition model to obtain convolution features corresponding to each of the images to be recognized.

[0073] S2022, performing deep convolution processing on all the convolution features through the MBConv network in the top recognition model to obtain output features corresponding to each of the convolution features.

[0074] S2023, performing recognition processing on all the output features through the recognition network in the top recognition model to obtain a top color recognition result and a top style recognition result.

[0075] Understandably, convolutional features refer to specific properties of an image extracted by convolutional operations on a convolutional network. Output features refer to image features extracted by an MBConv network. A convolutional network refers to a 3*3 convolutional network. The MBConv network is composed of 1x1 ordinary convolution (dimensionality increase, including BN and Swish activation), k*k Depthwise Conv convolution (including BN and Swish activation), k*k has two cases of 3x3 and 5x5, SE module, 1x1 ordinary convolution (dimensionality reduction, including BN and linear activation) and Dropout layer. The recognition network is composed of 1x1 ordinary convolution, average pooling layer and fully connected layer.

[0076] Specifically, when the classification detection result indicates that the clothing to be identified is a top, all the images to be identified of the clothing to be identified are cropped, that is, the clothing to be identified is cropped according to the target frame in the classification detection result, so as to obtain the target image corresponding to each image to be identified. Then, all the target images are input into the top recognition model, and all the target images are convolved respectively through the convolution network in the top recognition model, that is, firstly convolved through a convolution layer with a 3*3 convolution kernel and a step size of 2, and then the convolution layer results are batch normalized and activated through a BN layer and a Swish activation function, so as to obtain the convolution features corresponding to each target image. Furthermore, all convolutional features are subjected to deep convolution processing through the multi-layer MBConv network stacked in the top recognition model, that is, the convolutional features are dimensionally upgraded through a 1*1 convolutional layer (including a BN layer and a Swish activation function) to obtain dimensionally upgraded features. Then, group convolutions are performed on the feature dimension through a multi-layer convolutional kernel of K*K depth-separable convolutional layers (composed of depth-wise convolution plus point-wise convolution) including a BN layer and a Swish activation function. Independent depth-wise convolution is performed on each channel, and a 1x1 convolution (point-wise convolution) is used before the output. After all channels are aggregated by convolution, residual processing is performed through the SE module, that is, the feature map after the depth separable layer is divided into two branches after being passed into the SE module. One branch retains the current feature map, and the other branch first performs global average pooling on the feature map, and then passes through the first fully connected layer FC (using swish activation function) for dimensionality reduction, and then passes through the second fully connected layer FC (using sigmoid activation function) for dimensionality increase. Finally, the feature matrices of the two branches are multiplied to obtain the residual processing result. Then, after dimensionality reduction processing through a 1x1 convolution kernel and a normal convolution containing a BN layer, a part of the neurons in the neural network is randomly discarded through the Dropout layer to prevent overfitting, so as to improve the generalization ability of the model, and the output result and the input convolution feature are shortcut connected. After the connection features pass through the multi-layer MBConv network, the output features corresponding to each convolution feature can be obtained. All output features are processed through the recognition network in the top recognition model, that is, color recognition and style recognition are performed through the recognition layer composed of a 1x1 convolution layer including BN and activation function Swish, an average pooling layer, and a fully connected layer, to obtain the top color recognition results and top style recognition results.

[0077] In this embodiment, all images to be identified are convolved by a convolution network to extract convolution features. All convolution features are deep convolution processed by an MBConv network to obtain output features, thereby performing convolution in width and depth directions, reducing the number of parameters and improving the recognition speed. All output features are identified by a recognition network to obtain the results of top color recognition and top style recognition, thereby achieving accurate recognition of color and style.

[0078] In one embodiment, if Figure 7 As shown, in step S10, before the detection model is used to perform image classification and recognition on all the images to be recognized, the following step is also included:

[0079] S103, performing segmentation processing on all the images to be identified by using a slice-assisted hyper-inference algorithm to obtain at least one segmented image corresponding to each of the images to be identified.

[0080] Understandably, the Sliced ​​Inference Algorithm is a method for object detection for large-size images. It divides the image into multiple smaller slices, then performs object detection on each slice independently, and finally integrates the results to improve the detection performance of small targets. The sliced ​​image refers to a partial image in the image to be identified.

[0081] Specifically, after obtaining the image of the clothing to be identified, each image to be identified is segmented by the slice-assisted hyper-inference algorithm, that is, a preset sliding window and overlap amount (i.e., the overlap percentage between two segmented images) are obtained, and the moving stride of the sliding window is calculated by the size of the image to be identified, the size of the sliding window, and the overlap amount, and the image is segmented by the moving stride in the image to be identified by the sliding window, so as to obtain at least one segmented image corresponding to each image to be identified. For example, the width of the image to be identified is W, the height is H, the width of the sliding window is M, the height is N, and the overlap rate is P, then the horizontal stride S = M*(1-P), and the vertical stride S = N*(1-P). The number of horizontal slices K = ((WM) / S)+1, and the number of vertical slices K = ((HN) / S)+1. Using the stride S and the slice sizes M and N, the starting position of each slice is determined on the image to be identified, and the calculated slice positions and sizes are used to segment multiple overlapping segmented images from the image to be identified.

[0082] In this embodiment, all the images to be identified are segmented by a slice-assisted hyper-inference algorithm, thereby acquiring segmented images, thereby better capturing the features of small targets, and further improving the accuracy and robustness of the detection capability of small objects in the image.

[0083] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0084] In one embodiment, a clothing recognition device is provided, which corresponds one-to-one to the clothing recognition method in the above embodiment. Figure 8 As shown, the clothing recognition device includes an image classification recognition module 10, a clothing image recognition module 20 and a clothing recognition result module 30. The functional modules are described in detail as follows:

[0085] The image classification and recognition module 10 is used to obtain at least one image to be recognized corresponding to the clothing to be recognized, and perform image classification and recognition on all the images to be recognized through the detection model to obtain classification detection results, brand detection results and defect detection results corresponding to the clothing to be recognized;

[0086] A clothing image recognition module 20, configured to perform clothing image recognition on all the images to be recognized by using a type recognition model corresponding to the classification detection result, and obtain a style recognition result and a color recognition result;

[0087] The clothing recognition result module 30 is used to determine the clothing recognition result corresponding to the clothing to be recognized according to the brand detection result, the style recognition result, the color recognition result and the defect detection result.

[0088] Optionally, the detection model includes a classification detection model, a brand detection model and a defect detection model;

[0089] The image classification and recognition module 10 comprises:

[0090] A classification detection unit, used to perform classification detection on all the images to be identified by using the classification detection model to obtain classification detection results corresponding to the clothing to be identified;

[0091] A brand detection unit, configured to perform brand detection on all the images to be identified by using the brand detection model, and obtain brand detection results corresponding to the clothing to be identified;

[0092] A defect detection unit is used to perform defect detection on all the images to be identified by using the defect detection model to obtain defect detection results corresponding to the clothing to be identified.

[0093] Optionally, the classification detection unit includes:

[0094] A first feature extraction subunit is used to extract features of different scales from all the images to be identified through the first backbone network in the classification detection model to obtain first extracted features;

[0095] A first fusion feature subunit, used for performing feature fusion of different dimensions on all the first extracted features through a Neck network in the classification detection model to obtain a first fusion feature;

[0096] The classification detection result subunit is used to perform prediction processing on all the first fusion features through the first recognition network in the classification detection model to obtain a classification detection result.

[0097] Optionally, the brand detection unit includes:

[0098] A second feature extraction subunit is used to extract features of different scales from all the images to be identified through a second backbone network in the brand detection model to obtain second extracted features;

[0099] A second fusion feature subunit is used to perform feature fusion of different dimensions on all the second extracted features through the BiFPN network in the brand detection model to obtain a second fusion feature;

[0100] The brand detection result subunit is used to perform prediction processing on all the second fusion features through the second recognition network in the brand detection model to obtain a brand detection result.

[0101] Optionally, the type recognition model includes a top recognition model, a trouser skirt recognition model, a shoe recognition model and a home recognition model;

[0102] The clothing image recognition module 20 includes:

[0103] A top recognition unit, configured to, when the classification detection result indicates that the clothing to be recognized is a top, perform image recognition on all the images to be recognized by using the top recognition model to obtain a top color recognition result and a top style recognition result;

[0104] A trouser skirt recognition unit, used for, when the classification detection result indicates that the clothing to be recognized is a trouser skirt, performing image recognition on all the images to be recognized by using the trouser skirt recognition model to obtain a trouser skirt color recognition result and a trouser skirt style recognition result;

[0105] A shoe recognition unit, configured to, when the classification detection result indicates that the clothing to be recognized is a shoe, perform image recognition on all the images to be recognized by using the shoe recognition model to obtain a shoe color recognition result and a shoe style recognition result;

[0106] The home furnishing recognition unit is used to perform image recognition on all the images to be recognized by using the home furnishing recognition model when the classification detection result indicates that the clothing to be recognized is home furnishing, so as to obtain home furnishing color recognition results and home furnishing style recognition results.

[0107] Optionally, the top identification unit comprises:

[0108] A convolution processing subunit, configured to perform convolution processing on all the images to be recognized through the convolution network in the top recognition model, so as to obtain convolution features corresponding to each of the images to be recognized;

[0109] A deep convolution subunit, used for performing deep convolution processing on all the convolution features through the MBConv network in the top recognition model to obtain output features corresponding to each of the convolution features;

[0110] The recognition processing subunit is used to perform recognition processing on all the output features through the recognition network in the top recognition model to obtain a top color recognition result and a top style recognition result.

[0111] Optionally, the image classification and recognition module 10 further includes:

[0112] The segmentation processing unit is used to perform segmentation processing on all the images to be identified by using a slice-assisted hyper-inference algorithm to obtain at least one segmented image corresponding to each of the images to be identified.

[0113] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the clothing identification method.

[0114] For the specific definition of computer equipment, processors and their various units and modules, please refer to the definition of clothing identification method above, which will not be repeated here. Each module in the above-mentioned processor can be implemented in whole or in part by software, hardware and a combination thereof. It can be understood that the processor includes a processor, a memory, a network interface and a database connected by a device bus. Each module of the processor can be embedded in or independent of the processor in hardware form, or can be stored in the memory in software form, so that the processor can call and execute the operations corresponding to the above modules. Among them, the processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program and a database. The internal memory provides an environment for the operation of the operating device and the computer program in the non-volatile storage medium. The database is used to store the data used by the clothing identification method in the above-mentioned embodiment. The network interface is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a clothing identification method is implemented.

[0115] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned clothing identification method is implemented.

[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0117] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0118] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A clothing identification method, characterized in that: include: Acquire at least one image to be identified corresponding to the clothing to be identified, and perform image classification and recognition on all the images to be identified through a detection model to obtain classification detection results, brand detection results, and defect detection results corresponding to the clothing to be identified; Perform clothing image recognition on all the images to be recognized by using a type recognition model corresponding to the classification detection result to obtain a style recognition result and a color recognition result; A clothing recognition result corresponding to the clothing to be recognized is determined according to the brand detection result, the style recognition result, the color recognition result and the defect detection result.

2. The clothing identification method according to claim 1, characterized in that: The detection model includes a classification detection model, a brand detection model and a defect detection model; The method of performing image classification and recognition on all the images to be recognized by using the detection model to obtain classification detection results, brand detection results and defect detection results corresponding to the clothing to be recognized includes: Performing classification detection on all the images to be identified by using the classification detection model to obtain classification detection results corresponding to the clothing to be identified; Performing brand detection on all the images to be identified by using the brand detection model to obtain brand detection results corresponding to the clothing to be identified; Defect detection is performed on all the images to be identified using the defect detection model to obtain defect detection results corresponding to the clothing to be identified.

3. The clothing identification method according to claim 2, characterized in that: The step of performing classification detection on all the images to be identified by using the classification detection model to obtain classification detection results corresponding to the clothing to be identified includes: Extracting features of different scales from all the images to be identified by using the first backbone network in the classification detection model to obtain first extracted features; Performing feature fusion of different dimensions on all the first extracted features through the Neck network in the classification detection model to obtain a first fused feature; All the first fusion features are predicted and processed by the first recognition network in the classification detection model to obtain a classification detection result.

4. The clothing identification method according to claim 2, characterized in that: The step of performing brand detection on all the images to be identified by using the brand detection model to obtain brand detection results corresponding to the clothing to be identified includes: Extracting features of different scales from all the images to be identified by using the second backbone network in the brand detection model to obtain second extracted features; Performing feature fusion of different dimensions on all the second extracted features through the BiFPN network in the brand detection model to obtain second fused features; All the second fusion features are predicted and processed by the second recognition network in the brand detection model to obtain a brand detection result.

5. The clothing identification method according to claim 1, characterized in that: The type recognition model includes a top recognition model, a trouser skirt recognition model, a shoe recognition model and a home recognition model; The method of performing clothing image recognition on all the images to be recognized by using the type recognition model corresponding to the classification detection result to obtain a style recognition result and a color recognition result includes: When the classification detection result indicates that the clothing to be identified is a top, performing image recognition on all the images to be identified by using the top recognition model to obtain a top color recognition result and a top style recognition result; When the classification detection result indicates that the clothing to be identified is a culottes, image recognition is performed on all the images to be identified by the culottes recognition model to obtain a culottes color recognition result and a culottes style recognition result; When the classification detection result indicates that the clothing to be identified is a shoe, performing image recognition on all the images to be identified by using the shoe recognition model to obtain a shoe color recognition result and a shoe style recognition result; When the classification detection result indicates that the clothing to be identified is home furnishings, image recognition is performed on all the images to be identified using the home furnishing recognition model to obtain home furnishing color recognition results and home furnishing style recognition results.

6. The clothing identification method according to claim 3, characterized in that: The method of performing image recognition on all the images to be recognized by the top recognition model to obtain a top color recognition result and a top style recognition result includes: Performing convolution processing on all the images to be recognized through the convolution network in the top recognition model to obtain convolution features corresponding to each of the images to be recognized; Performing deep convolution processing on all the convolution features through the MBConv network in the top recognition model to obtain output features corresponding to each of the convolution features; All the output features are processed by the recognition network in the top recognition model to obtain a top color recognition result and a top style recognition result.

7. The clothing identification method according to claim 1, characterized in that: Before performing image classification and recognition on all the images to be recognized by the detection model, the method further includes: All the images to be identified are segmented using a slice-assisted hyper-inference algorithm to obtain at least one segmented image corresponding to each of the images to be identified.

8. A clothing identification device, characterized in that: include: An image classification and recognition module is used to obtain at least one image to be recognized corresponding to the clothing to be recognized, and perform image classification and recognition on all the images to be recognized through a detection model to obtain classification detection results, brand detection results and defect detection results corresponding to the clothing to be recognized; A clothing image recognition module, used to perform clothing image recognition on all the images to be recognized by using a type recognition model corresponding to the classification detection result, and obtain a style recognition result and a color recognition result; The clothing recognition result module is used to determine the clothing recognition result corresponding to the clothing to be recognized based on the brand detection result, the style recognition result, the color recognition result and the defect detection result.

9. A computer device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the clothing identification method according to any one of claims 1 to 7.

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

Citation Information

Patent Citations

  • Method for recognizing clothing material, and terminal

    CN106874344A

  • Clothes detection method and device and storage medium

    CN112052883A

  • Article identification method, device and equipment

    CN113344012A

  • Virtual reloading method and device, electronic equipment and storage medium

    CN114119855A

  • Machine control method and system based on object recognition

    CN114466954A

Cited By

  • Pedestrian clothing identification method, device and equipment based on improved YOLOv8 model and storage medium

    CN120656043A

  • Pedestrian clothing recognition method and device based on improved YOLOv8 model, equipment and storage medium

    CN120656043B