Jeans wear target detection method and device

By integrating the CDBB sub-module, the scale-aware RFE sub-module and the efficient decoupling head module, combined with the Shape-IoU loss function to optimize the target detection model, the problem of low accuracy and speed of the traditional denim clothing detection method is solved, and the denim clothing project is significantly improved. detection accuracy and efficiency.

CN118587497APending Publication Date: 2024-09-03ZHEJIANG UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410738445.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Traditional denim clothing detection methods have problems such as low accuracy and slow speed, especially due to insufficient classification accuracy of the data set, low recognition accuracy of the algorithm model, and limitations of the deep learning model in feature extraction and positioning capabilities that affect the recognition accuracy. .

Method used

The backbone module integrating the CDBB sub-module and the scale-aware RFE sub-module, the neck module integrating the CDBB sub-module, and the efficient decoupling head module are used to optimize the target detection model in combination with the Shape-IoU loss function for extracting denim sample data. Feature representation and identification of features at different scales for target classification and bounding box regression.

Benefits of technology

Improved the accuracy, robustness and efficiency of denim clothing object detection, especially in identifying denim clothing items with complex shapes and details such as belts, sunglasses, boots, cowboy hats and jackets, with recall and average precision better than existing ones. There are models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587497A
    Figure CN118587497A
Patent Text Reader

Abstract

The invention discloses a cowboy wear target detection method and device, and the method comprises the following steps: obtaining cowboy wear sample data, and marking the cowboy wear sample data to obtain label data; a target detection model is constructed, the target detection model comprises a trunk module integrating a CDBB submodule and a scale perception RFE submodule, a neck module integrating the CDBB submodule and an efficient decoupling head module, the trunk module is used for extracting feature representation of cowboy wear sample data, and the neck module is used for recognizing cowboy wear features of different scales based on the feature representation; the efficient decoupling head module is used for carrying out target classification and bounding box regression to identify boundaries based on the jeans wear features of different scales; the Shape-IoU loss function, the classification loss and the confidence loss are adopted, parameter optimization is performed on the target detection model based on the label data corresponding to the sample data set, and the target detection model after parameter optimization is used for target detection of the cowboy wear, so that the target detection precision, robustness and efficiency in the cowboy wear can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target detection, and in particular relates to a method and a device for detecting a denim target. Background Art

[0002] In recent years, with the rapid development of computer vision technology, object detection algorithms have played an increasingly important role in various fields. Among them, object detection algorithms based on deep learning have made significant progress and provided effective solutions for real-time and accurate detection of various objects in images or videos.

[0003] Traditional clothing classification methods rely on image features and manual design, and use pattern recognition and image processing technology to identify, segment, and detect image features to achieve clothing classification. Deep learning has excellent feature expression capabilities, can extract deep information from clothing images, and process various interference factors, such as multi-label, multi-scale, complex background, and human body information. However, conventional deep learning models have huge computational complexity, resulting in low detection efficiency. In order to solve this problem, a variety of improved models have been proposed, such as Tian Weiwei's YOLOV4-GS, Yang Yanwen's improved residual network, Xie Xiaohong's transfer learning method, Tan Zhuoyi's improved Xception model, etc. These methods have performed well in improving classification accuracy and timeliness. Other researchers have further optimized model performance by improving existing network structures, such as VGG16, ResNet, Inception_v3, ShuffleNet, etc. For example, Gong Ke optimized VGG16 by fusing residual features, Lv et al. designed a model based on posture estimation, Zhang et al. proposed a texture and shape biased dual-stream network, Chen Xinhua et al. designed a lightweight feature extraction network, etc. These methods have improved the accuracy and efficiency of clothing image classification to varying degrees. In general, clothing image classification based on deep learning reduces the image preprocessing process compared to traditional methods, but requires a large amount of accurate labeled data for training.

[0004] Traditional clothing classification and recognition methods are complex and have many limitations. However, clothing image classification detection based on deep learning has high efficiency and accuracy, and has a wide range of applications. It is the main research method for clothing image classification in the future. Jeans play an important role in the clothing industry. However, due to its diverse styles and materials, traditional jeans detection methods often have certain limitations, such as low accuracy and slow speed, including:

[0005] (1) The classification accuracy of existing datasets is insufficient: Most current research focuses on the recognition of basic clothing categories, which cannot meet people's needs for accurate recognition of style information of key parts of jeans.

[0006] (2) The algorithm model has low recognition accuracy: Jeans face problems such as occlusion, deformation, and small style parts in their recognition. At the same time, the limitations of deep learning models in feature extraction and positioning capabilities also affect recognition accuracy. These factors together lead to the current algorithm model's unsatisfactory accuracy in jeans recognition. Summary of the invention

[0007] In view of the above, an object of the present invention is to provide a method and device for detecting a target in jeans, aiming to improve the accuracy, robustness and efficiency of target detection in jeans.

[0008] To achieve the above-mentioned purpose of the invention, an embodiment provides a method for detecting a denim clothing object, comprising the following steps:

[0009] Obtain denim clothing sample data, and annotate the denim clothing sample data to obtain label data;

[0010] Construct an object detection model, including a trunk module integrating CDBB submodules and scale-aware RFE submodules, a neck module integrating CDBB submodules, and an efficient decoupling head module. The trunk module is used to extract feature representations of denim sample data, the neck module is used to identify denim features of different scales based on feature representations, and the efficient decoupling head module is used to perform object classification and bounding box regression identification based on denim features of different scales.

[0011] The Shape-IoU loss function, classification loss and confidence loss are used to optimize the parameters of the object detection model based on the label data corresponding to the sample data set, and the object detection model after parameter optimization is used to detect the object of jeans.

[0012] Preferably, the backbone module integrating the CDBB submodule and the scale-aware RFE submodule comprises: using YOLOv5 as a basic framework, replacing the C3 module in the YOLOv5 backbone network with the CDBB submodule, and connecting the scale-aware RFE submodule to the output end of the last layer of the YOLOv5 backbone network as the output end of the backbone module;

[0013] Among them, the CDBB sub-module is used to capture feature representations that can improve detection performance; the scale-aware RFE sub-module introduces adaptive receptive field and multi-scale feature fusion to pay more attention to feature representations of different scales.

[0014] Preferably, the neck module integrating the CDBB submodule comprises: taking YOLOv5 as the basic framework, replacing the C3 module in the YOLOv5 neck network with the CDBB submodule, while maintaining the connection mode with the backbone network in YOLOv5, and connecting with the backbone module integrating the CDBB submodule and the scale-aware RFE submodule.

[0015] Preferably, the CDBB submodule includes a depthwise separable convolution and a bottleneck block, wherein the bottleneck block includes a multi-layer bottleneck structure, each layer of the bottleneck structure includes a plurality of DBB submodules, and a residual connection is constructed between the input end of the first DBB submodule and the output end of the last DBB submodule;

[0016] Each DBB submodule includes four branches. The first branch includes a convolutional layer and a batch normalization layer of a scale of 1×1 connected in sequence. The second branch includes a convolutional layer of a scale of 1×1, a batch normalization layer, a convolutional layer of a scale of K×K, and a batch normalization layer connected in sequence. The third branch includes a convolutional layer of a scale of 1×1, a batch normalization layer, an average pooling layer, and a batch normalization layer connected in sequence. The fourth branch includes a convolutional layer of a scale of K×K and a batch normalization layer connected in sequence. The outputs of the four branches are concatenated and then subjected to nonlinear mapping.

[0017] In the training phase, four branches are used to process the input features simultaneously. In the application reasoning phase, the K×K convolutional layer in the fourth branch with optimized parameters is used to process the input features and then perform nonlinear mapping.

[0018] In the training phase, four branches are used to process the input features simultaneously, and in the application reasoning phase, the fourth branch with optimized parameters is used to process the input features.

[0019] Preferably, the scale-aware RFE submodule includes two branches, one of which uses a convolutional layer, and the other uses a convolutional layer and an RFE submodule, and the output results of the two branches are concatenated as the output of the scale-aware RFE submodule;

[0020] The RFE submodule consists of four branches, three of which use three dilated convolutions with different dilation rates to extract features to extract scale information. The three branches share parameters at the same time. The input and output ends of each branch are also connected to the residual. The output features of the three branches are concatenated with the input features and then subjected to multi-branch average pooling as the output of the RFE submodule.

[0021] Preferably, the efficient decoupling head module comprises: using YOLOv5 as the basic framework, and replacing the C3 module in the YOLOv5 backbone network with the CDBB submodule, and replacing each detection branch in the YOLOv5 prediction network with an efficient decoupling head capable of achieving classification and bounding box regression, and maintaining the connection mode with the neck network in YOLOv5, and connecting with the neck module integrating the CDBB submodule;

[0022] Among them, each efficient decoupling head includes a convolutional layer of scale 1×1, a classification branch and a regression branch connected to the output of the convolutional layer at the same time, wherein the classification branch includes a convolutional layer of scale 3×3 and a convolutional layer of scale 1×1 connected in sequence to obtain a classification result matrix, and the regression branch includes a 3×3 convolutional layer, and a target recognition sub-branch and a boundary regression sub-branch connected to the output of the 3×3 convolutional layer at the same time. The final result obtained by the two sub-branches is used as the bounding box regression result.

[0023] Preferably, the Shape-IoU loss function includes:

[0024]

[0025]

[0026]

[0027]

[0028]

[0029] L shape-IoU =1-f IoU +d s +0.5Ω s

[0030] Among them, s is the scale factor, w gt and h gt is the length and width of the GT box (label box), and is the coordinate of the center point of the GT box, w and h are the length and width of the prior box (Anchor), x c and c is the coordinate of the center point of the prior box, w w With h h are the weight coefficients in the horizontal and vertical directions respectively, and their values ​​are related to the shape of the GT box. θ is used to control the degree of attention paid to shape loss. In order to avoid paying too much attention to shape loss and reducing the movement of the prediction box, its value is determined by genetic algorithm to be 4. s represents the distance loss, Ω s represents the shape loss, c represents a constant related to the dataset, ω w and ω h represents the parameter, f IoU represents the IOU loss.

[0031] To achieve the above-mentioned purpose of the invention, the embodiment further provides a denim clothing object detection device, comprising:

[0032] A data processing module unit, which is used to obtain the denim clothing sample data and annotate the denim clothing sample data to obtain label data;

[0033] A model building unit, which is used to build a target detection model, including a trunk module integrating a CDBB submodule and a scale-aware RFE submodule, a neck module integrating a CDBB submodule, and an efficient decoupling head module, wherein the trunk module is used to extract feature representations of denim sample data, the neck module is used to identify features of denim at different scales based on feature representations, and the efficient decoupling head module is used to perform target classification and bounding box regression recognition of boundaries based on features of denim at different scales;

[0034] The module training and application unit is used to optimize the parameters of the target detection model based on the label data corresponding to the sample data set by using the Shape-IoU loss function, classification loss and confidence loss, and use the target detection model after parameter optimization to perform target detection of jeans.

[0035] To achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computing device, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the above-mentioned jeans target detection method.

[0036] To achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned denim clothing target detection method is implemented.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] The present invention improves on the YOLOv5 algorithm and proposes a target detection model including a backbone module integrating CDBB submodules and scale-aware RFE submodules, a neck module integrating CDBB submodules, and an efficient decoupled head module. The Shape-IoU loss function is used for model optimization, aiming to improve the accuracy, robustness and efficiency of detection, especially for denim clothing items such as belts, sunglasses, boots, cowboy hats and jackets. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1is a flow chart of a method for detecting a jeans target provided by an embodiment;

[0041] Figure 2 A schematic diagram of the structure of the target detection model provided in the embodiment;

[0042] Figure 3 is a schematic diagram of the structure of the CDBB submodule provided in the embodiment;

[0043] Figure 4 is a schematic diagram of a multi-layer bottleneck structure in a CDBB submodule provided in an embodiment;

[0044] Figure 5 is a schematic structural diagram of a DBB submodule in a bottleneck structure provided in an embodiment;

[0045] Figure 6 The SPPF provided in the embodiment is a schematic structural diagram;

[0046] Figure 7 is a schematic diagram of the structure of a scale-aware RFE submodule provided in an embodiment;

[0047] Figure 8 is a schematic structural diagram of a high-efficiency decoupling head provided in an embodiment;

[0048] Fig. 9 is a comparison diagram of detection effects provided by the embodiment;

[0049] Fig.10 Schematic diagram of the structure of the jeans object detection device provided in the embodiment. DETAILED DESCRIPTION

[0050] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0051] like Figure 1 As shown, the jeans object detection method provided in the embodiment includes the following steps:

[0052] S1, obtaining denim clothing sample data, and labeling the denim clothing sample data to obtain label data.

[0053] In the embodiment, denim sample data is prepared, including images of denim clothing items, including belts, sunglasses, boots, cowboy hats and jackets, and the sample data are annotated to obtain annotated data, wherein the annotated data includes the shape and classification of the detection target.

[0054] S2, build the target detection model.

[0055] The target detection model provided in the embodiment is based on YOLOv5 as the basic framework and is obtained through improvements, such as Figure 2 As shown in the figure, it includes a backbone module integrating CDBB submodules and scale-aware RFE submodules, a neck module integrating CDBB submodules, and an efficient decoupling head module. The backbone module is used to extract feature representations of denim sample data, the neck module is used to identify denim features of different scales based on feature representations, and the efficient decoupling head module is used to perform target classification and bounding box regression recognition based on denim features of different scales.

[0056] The backbone of the object detection algorithm plays a vital role in feature extraction and representation. In the traditional YOLOv5, the C3 module is used as the backbone architecture. However, the C3 module may have limitations in capturing complex spatial relationships and semantic information, especially for denim clothing with complex details. To this end, the embodiment uses the CDBB submodule to replace the C3 module in the YOLOv5 backbone network to construct the backbone module of the present invention, wherein the CDBB submodule is used to capture feature representations that can improve detection performance. The backbone network also includes the following Figure 6 The SPPF submodules are shown.

[0057] like Figure 3 As shown, the CDBB submodule includes a depthwise separable convolution CBS and a bottleneck block, wherein the bottleneck block includes a multi-layer bottleneck structure. Figure 4 As shown, each bottleneck structure includes multiple diversified branch sub-modules (DBBs), and a residual connection is constructed between the input end of the first DBB sub-module and the output end of the last DBB sub-module.

[0058] like Figure 5 As shown, each DBB submodule includes four branches, the first branch includes a convolutional layer and a batch normalization layer of scale 1×1 connected in sequence, the second branch includes a convolutional layer of scale 1×1, a batch normalization layer, a convolutional layer of scale K×K, and a batch normalization layer connected in sequence, the third branch includes a convolutional layer of scale 1×1, a batch normalization layer, an average pooling layer, and a batch normalization layer connected in sequence, and the fourth branch includes a convolutional layer of scale K×K and a batch normalization layer connected in sequence. The outputs of the four branches are concatenated and then subjected to nonlinear mapping; and the four branches are used to process the input features at the same time in the training stage, and the K×K convolutional layer in the fourth branch after parameter optimization is used in the application reasoning stage to process the input features and then undergo nonlinear mapping. Through such a CDBB submodule, the feature representation is enhanced while maintaining computational efficiency. By using the CDBB submodule, it is intended to capture richer feature representations of the denim clothing project, thereby improving the detection performance.

[0059] Detecting objects of different scales is crucial for robust object detection, especially for denim clothing items of different sizes and shapes. In order to solve the scale variation problem, when building the backbone module, the scale-aware RFE (Receptive Field Enhancement) submodule is also connected to the output of the last layer of the YOLOv5 backbone network as the output of the backbone module. This layer is named: CFEM (Context Fusion Enhancement Module).

[0060] like Figure 7 As shown in the figure, the constructed scale-aware RFE submodule includes two branches, one of which uses a convolutional layer (conv), and the other uses a convolutional layer and an RFE submodule (RFE). The output results of the two branches are concatenated as the output of the scale-aware RFE submodule. The RFE submodule includes four branches, three of which use three dilated convolutions with different dilation rates to extract features to extract scale information. The three branches share parameters at the same time, and the input and output ends of each branch are also connected to residuals. The output features of the three branches are concatenated with the input features and then subjected to multi-branch average pooling as the output of the RFE submodule.

[0061] The scale-aware RFE submodule introduces an adaptive receptive field and multi-scale feature fusion mechanism, which can effectively perceive and identify denim clothing items of different scales. Adding the scale-aware RFE submodule to the backbone module enhances the network's ability to detect denim clothing of different sizes and aspect ratios.

[0062] The neck module integrating the CDBB submodule includes: using YOLOv5 as the basic framework, replacing the C3 module in the YOLOv5 neck network with the CDBB submodule, while maintaining the connection mode with the backbone network in YOLOv5, and connecting with the backbone module integrating the CDBB submodule and the scale-aware RFE submodule. Such a neck module can capture richer feature information when extracting feature information.

[0063] The detection head of the object detection algorithm is responsible for predicting the bounding box and class probability of the detected object. In the efficient decoupled head module of the present invention, YOLOv5 is used as the basic framework, and the CDBB submodule is used to replace the C3 module in the YOLOv5 backbone network, and each detection branch in the YOLOv5 prediction network is replaced by an efficient decoupled head that can achieve classification and bounding box regression, and the connection mode with the neck network in YOLOv5 is maintained, and the neck module integrated with the CDBB submodule is connected.

[0064] like Figure 8As shown in the figure, each efficient decoupling head includes a convolutional layer of scale 1×1, a classification branch and a regression branch connected to the output of the convolutional layer, wherein the classification branch includes a convolutional layer of scale 3×3 and a convolutional layer of scale 1×1 connected in sequence to obtain a classification result matrix, and the regression branch includes a 3×3 convolutional layer, and a target recognition sub-branch and a boundary regression sub-branch connected to the output of the 3×3 convolutional layer. The final result obtained by the two sub-branches is the bounding box regression result. Such an efficient decoupling head decouples the object detection task into object classification and bounding box regression sub-tasks, allowing each task to be optimized separately. This decoupling improves detection accuracy and speed, especially for complex denim clothing items with different shapes and textures.

[0065] S3, uses Shape-IoU loss function, classification loss and confidence loss and optimizes the parameters of the target detection model based on the label data corresponding to the sample data set, and uses the target detection model after parameter optimization to perform target detection of jeans.

[0066] The loss function used in the training process plays a vital role in guiding the learning process and optimizing the model parameters. In this paper, the Shape-IoU loss function is used, which incorporates shape information into the loss calculation, allowing the network to focus more on accurately predicting object boundaries. This is especially beneficial for the denim clothing project, as denim clothing often has complex shapes and details. By optimizing the Shape-IoU loss function, the goal is to improve the model's ability to detect denim clothing with higher precision and recall. Shape-IoU loss function L shape-IoU include:

[0067]

[0068]

[0069]

[0070]

[0071]

[0072] L shape-IoU =1-f IoU +d s +0.5Ω s

[0073] Among them, s is the scale factor, w gt and h gt is the length and width of the GT box (label box), and is the coordinate of the center point of the GT box, w and h are the length and width of the prior box (Anchor), xc and c is the coordinate of the center point of the prior box, w w With h h are the weight coefficients in the horizontal and vertical directions respectively, θ is the degree of attention paid to shape loss, and d s represents the distance loss, Ω s represents the shape loss, c represents a constant related to the dataset, ω w and ω h represents the parameter, f IoU Represents IOU loss;

[0074] The classification loss uses the original classification loss of YOLOv5, such as cross entropy.

[0075] The confidence loss adopts the original confidence loss of YOLOv5, such as binary cross entropy.

[0076] The target detection model optimized by the Shape-IoU loss function, classification loss and confidence loss is used to detect targets in jeans. Specifically, the jeans are input into the target detection model, and the detection results of targets of different scales can be obtained through forward reasoning of the model.

[0077] In order to verify the technical effect of the denim clothing object detection method provided by the present invention, an experimental verification is carried out. The data in the experiment uses a public denim clothing image dataset, which contains annotated images of belts, sunglasses, boots, cowboy hats and jackets to ensure full coverage of the target denim clothing items.

[0078] At the same time, the experimental settings are set up. The specific experimental environment is: CPU: 12th Gen Intel(R)Core(TM)i5-12400F 2.50GHz, memory 16G. GPU is NVIDIA GeForce RTX 3060Ti, video memory 8G, operating system is 64-bit operating system, based on x64 processor. The deep learning framework used is pytorch1.8.2, and the programming language is python 3.8.19. In this article, the model is trained on the GPU for 150 rounds, and the batch size is 16.

[0079] In the experiment, the object detection model of the present invention was trained and evaluated on the denim clothing dataset using a standard deep learning framework and hardware platform. Data augmentation techniques such as random cropping and flipping were applied to enhance the generalization and robustness of the model. Indicators such as recall (the ability of the model to recognize all object instances in an image) and mean average precision (mAP) were used to monitor the training progress. The training results are shown in Table 1:

[0080] Table 1

[0081]

[0082] The results in Table 1 show that the target detection model (MyYolo) used in the present invention is superior to the existing models Yolov5s, Yolov6s, and Yolov8s in both recall rate and mAP. 50 Represents the mean average precision calculated at an intersection greater than union (loU) threshold of 0.50. This is a measure of the accuracy of a model that only considers "easy" detections, mAP 50-95 It represents the average of the average precision calculated under different loU thresholds between 0.50 and 0.95. It fully reflects the performance of the model under different detection difficulties.

[0083] We also conducted ablation experiments on different modules in the model. The ablation results are shown in Table 2:

[0084] Table 2

[0085]

[0086] The results in Table 2 show that the target detection model of the present invention, which is composed of CRFE, Shape-iou, Efficient_head and CDBB, can achieve the highest average detection accuracy.

[0087] Also provided are qualitative results of denim clothing detection performed by the target detection model of the present invention on sample images of a denim clothing dataset. Fig. 9 The detection results are shown superimposed on sample images, highlighting the ability of the proposed object detection model to accurately locate objects such as sunglasses and boots in a variety of environments and scenarios. Qualitative results show that the proposed enhancements are effective in detecting denim clothing items with high precision and recall even under challenging conditions such as occlusion, clutter, and varying lighting conditions.

[0088] In conclusion, the proposed object detection model represents a significant advancement in object detection technology, especially for denim clothing detection. The proposed enhancements improve the accuracy, robustness, and efficiency of detection, paving the way for various applications in the fashion industry, e-commerce, retail, and other fields.

[0089] like Fig.10As shown, the embodiment further provides a denim target detection device 100, including: a data processing module unit 101, a model construction unit 102, and a module training and application unit 103, wherein the data processing module unit 101 is used to obtain denim sample data, and annotate the denim sample data to obtain label data; the model construction unit 102 is used to construct a target detection model, including a trunk module integrating a CDBB submodule and a scale-aware RFE submodule, a neck module integrating the CDBB submodule, and an efficient decoupling head module, the trunk module is used to extract feature representation of the denim sample data, the neck module is used to identify denim features of different scales based on the feature representation, and the efficient decoupling head module is used to perform target classification and bounding box regression recognition boundaries based on denim features of different scales; the module training and application unit 103 is used to use the Shape-IoU loss function, classification loss and confidence loss and optimize the parameters of the target detection model based on the label data corresponding to the sample data set, and use the target detection model after parameter optimization to perform denim target detection.

[0090] It should be noted that the denim target detection device provided in the above embodiment should be illustrated by the division of the above functional units or modules when constructing the denim target detection. The above functional distribution can be completed by different functional units or modules as needed, that is, the internal structure of the terminal or server is divided into different functional units or modules to complete all or part of the functions described above. In addition, the denim target detection device provided in the above embodiment and the denim target detection construction method embodiment belong to the same concept. The specific implementation process is detailed in the denim target detection method embodiment, which will not be repeated here.

[0091] Based on the same inventive concept, an embodiment further provides a computing device, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, the method for detecting a denim object is implemented, specifically including the following steps:

[0092] S1, obtaining denim clothing sample data, and labeling the denim clothing sample data to obtain label data;

[0093] S2, build target detection model;

[0094] S3, uses Shape-IoU loss function, classification loss and confidence loss and optimizes the parameters of the target detection model based on the label data corresponding to the sample data set, and uses the target detection model after parameter optimization to perform target detection of jeans.

[0095] The computing device provided in the embodiment, in addition to the processor and memory, also includes hardware required for other services such as internal bus, network interface, memory, etc. at the hardware level. The memory is a non-volatile memory, and the processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the denim target detection method described in S1-S3 above. Of course, in addition to the software implementation, the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0096] Based on the same inventive concept, an embodiment further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned jeans object detection method is implemented, which specifically includes the following steps:

[0097] S1, obtaining denim clothing sample data, and labeling the denim clothing sample data to obtain label data;

[0098] S2, build target detection model;

[0099] S3, uses Shape-IoU loss function, classification loss and confidence loss and optimizes the parameters of the target detection model based on the label data corresponding to the sample data set, and uses the target detection model after parameter optimization to perform target detection of jeans.

[0100] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting a jeans object, characterized in that: The following steps are involved: Obtain denim clothing sample data, and annotate the denim clothing sample data to obtain label data; Construct an object detection model, including a trunk module integrating CDBB submodules and scale-aware RFE submodules, a neck module integrating CDBB submodules, and an efficient decoupling head module. The trunk module is used to extract feature representations of denim sample data, the neck module is used to identify denim features of different scales based on feature representations, and the efficient decoupling head module is used to perform object classification and bounding box regression identification based on denim features of different scales. The Shape-IoU loss function, classification loss and confidence loss are used to optimize the parameters of the object detection model based on the label data corresponding to the sample data set, and the object detection model after parameter optimization is used to detect the object of jeans.

2. The method for detecting jeans according to claim 1, characterized in that: The backbone module integrating the CDBB submodule and the scale-aware RFE submodule includes: using YOLOv5 as a basic framework, replacing the C3 module in the YOLOv5 backbone network with the CDBB submodule, and connecting the scale-aware RFE submodule to the output end of the last layer of the YOLOv5 backbone network as the output end of the backbone module; Among them, the CDBB sub-module is used to capture feature representations that can improve detection performance; the scale-aware RFE sub-module introduces adaptive receptive field and multi-scale feature fusion to pay more attention to feature representations of different scales.

3. The method for detecting jeans according to claim 2, characterized in that: The neck module integrating the CDBB submodule includes: using YOLOv5 as a basic framework, replacing the C3 module in the YOLOv5 neck network with the CDBB submodule, while maintaining the connection mode with the backbone network in YOLOv5, and connecting with the backbone module integrating the CDBB submodule and the scale-aware RFE submodule.

4. The method for detecting jeans as claimed in claim 2 or 3, characterized in that: The CDBB submodule includes a depthwise separable convolution and a bottleneck block, wherein the bottleneck block includes a multi-layer bottleneck structure, each layer of the bottleneck structure includes a plurality of DBB submodules, and a residual connection is constructed between the input end of the first DBB submodule and the output end of the last DBB submodule; Each DBB submodule includes four branches. The first branch includes a convolutional layer and a batch normalization layer of a scale of 1×1 connected in sequence. The second branch includes a convolutional layer of a scale of 1×1, a batch normalization layer, a convolutional layer of a scale of K×K, and a batch normalization layer connected in sequence. The third branch includes a convolutional layer of a scale of 1×1, a batch normalization layer, an average pooling layer, and a batch normalization layer connected in sequence. The fourth branch includes a convolutional layer of a scale of K×K and a batch normalization layer connected in sequence. The outputs of the four branches are concatenated and then subjected to nonlinear mapping. In the training phase, four branches are used to process the input features simultaneously. In the application reasoning phase, the K×K convolutional layer in the fourth branch with optimized parameters is used to process the input features and then perform nonlinear mapping.

5. The method for detecting jeans as claimed in claim 2, characterized in that: The scale-aware RFE submodule includes two branches, one of which uses a convolutional layer, and the other uses a convolutional layer and an RFE submodule. The output results of the two branches are concatenated as the output of the scale-aware RFE submodule. The RFE submodule consists of four branches, three of which use three dilated convolutions with different dilation rates to extract features to extract scale information. The three branches share parameters at the same time. The input and output ends of each branch are also connected to the residual. The output features of the three branches are concatenated with the input features and then subjected to multi-branch average pooling as the output of the RFE submodule.

6. The method for detecting jeans as claimed in claim 3, characterized in that: The efficient decoupling head module includes: using YOLOv5 as a basic framework, replacing the C3 module in the YOLOv5 backbone network with the CDBB submodule, and replacing each detection branch in the YOLOv5 prediction network with an efficient decoupling head capable of achieving classification and bounding box regression, and maintaining a connection mode with the neck network in YOLOv5, and connecting with the neck module integrating the CDBB submodule; Among them, each efficient decoupling head includes a convolutional layer of scale 1×1, a classification branch and a regression branch connected to the output of the convolutional layer at the same time, wherein the classification branch includes a convolutional layer of scale 3×3 and a convolutional layer of scale 1×1 connected in sequence to obtain a classification result matrix, and the regression branch includes a 3×3 convolutional layer, and a target recognition sub-branch and a boundary regression sub-branch connected to the output of the 3×3 convolutional layer at the same time. The final result obtained by the two sub-branches is used as the bounding box regression result.

7. The method for detecting jeans as claimed in claim 3, characterized in that: The Shape-IoU loss function L shape-IoU include: L shape-IoU =1-f IoU +d s +0.5Ω s Among them, s is the scale factor, w gt and h gt is the length and width of the GT box (label box), and is the coordinate of the center point of the GT box, w and h are the length and width of the prior box (Anchor), x c and c is the coordinate of the center point of the prior box, w w With h h are the weight coefficients in the horizontal and vertical directions respectively, θ is the degree of attention paid to shape loss, and d s represents the distance loss, Ω s represents the shape loss, c represents a constant related to the dataset, ω w and ω h represents the parameter, f IoU represents the IOU loss.

8. A denim clothing object detection device, characterized in that: include: A data processing module unit, which is used to obtain the denim clothing sample data and annotate the denim clothing sample data to obtain label data; A model building unit, which is used to build a target detection model, including a trunk module integrating a CDBB submodule and a scale-aware RFE submodule, a neck module integrating a CDBB submodule, and an efficient decoupling head module, wherein the trunk module is used to extract feature representations of denim sample data, the neck module is used to identify features of denim at different scales based on feature representations, and the efficient decoupling head module is used to perform target classification and bounding box regression recognition of boundaries based on features of denim at different scales; The module training and application unit is used to optimize the parameters of the target detection model based on the label data corresponding to the sample data set by using the Shape-IoU loss function, classification loss and confidence loss, and use the target detection model after parameter optimization to perform target detection of jeans.

9. A computing device comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the one or more processors execute the executable code, they are used to implement the jeans object detection method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, the method for detecting a jeans object described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Safety suit detection method and system based on improved YOLO V5

    CN113553979A

  • Training method and detection method of uniform detection model, equipment and storage medium

    CN116310300A

  • Improved yolov5-based catering worker clothing identification method

    CN116580352A