Journal of Textile Research ›› 2022, Vol. 43 ›› Issue (10): 155-160.doi: 10.13475/j.fzxb.20210809306

• Apparel Engineering • Previous Articles     Next Articles

Lightweight clothing detection method based on an improved YOLOv5 network

CHEN Jinguang1(), LI Xue1, SHAO Jingfeng2, MA Lili1   

  1. 1. School of Computer Science, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
    2. School of Management, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2021-08-24 Revised:2022-06-27 Online:2022-10-15 Published:2022-10-28

Abstract:

In order to further reduce the occupation of computing resources by the clothing object detection model based on deep learning, an improved lightweight clothing object detection method, MV3L-YOLOv5, was proposed. The MobileNetV3_Large is used to construct the backbone network of YOLOv5, and the label smoothing strategy was introduced to enhance the generalization ability at the training stage of the model. The data augmentation technology was used to make up for the unbalanced number of images of different clothing categories in the DeepFashion2 dataset. Experimental results show that the model volume of MV3L-YOLOv5 is 10.27 MB, the floating-point operations is 10.2×109 times, and mean average precision is 76.6 %. Comparing with YOLOv5s, which is the lightest network in YOLOv5 series, MV3L-YOLOv5 is compressed in the model volume by 26.4 %, reduced the floating-point operations by 39 %, and improved accuracy by 1.3 %. Experimental results in the improved algorithm show that the detection performance is notably improved, and the model is lighter and more suitable for deployment in devices with limited resources.

Key words: deep learning, object detection, clothing image, lightweight network, YOLOv5

CLC Number: 

  • TS941

Fig.1

MV3L-YOLOv5 network structure"

Fig.2

Images example after data augmentation. (a) Original images; (b) Results of data augmentation"

Tab.1

Numbers of items of clothing in training data set and validation data set"

服装类别 类别序号 训练集/个 验证集/个
短袖衫 1 4 028 2 337
长袖衫 2 2 147 1 130
短袖外衫 3 899 142
长袖外套 4 1 356 919
背心 5 1 596 991
吊带 6 1 110 322
短裤 7 2 833 1 186
长裤 8 3 691 2 265
半身裙 9 2 391 1 514
短袖连衣裙 10 1 132 516
长袖连衣裙 11 1 472 605
无袖连衣裙 12 1 357 846
吊带裙 13 846 504

Fig.3

Loss and PmA curve of model"

Tab.2

Comparison of PA of each clothing category before and after model improvement"

服装类别 平均精度PA/%
MV3L-YOLOv5 YOLOv5s
短袖衫 91.5 91.4
长袖衫 76.9 75.3
短袖外衫 51.0 48.4
长袖外套 85.2 84.1
背心 83.5 84.1
吊带 64.0 61.8
短裤 89.1 89.5
长裤 94.1 94.2
半身裙 81.9 80.5
短袖连衣裙 64.0 63.6
长袖连衣裙 69.8 65.8
无袖连衣裙 69.9 69.2
吊带裙 74.8 70.3

Tab.3

Comparison of training results of models"

模型 尺寸/像素 精准
率/%
召回
率/%
平均检测精度
均值PmA/%
MV3L-YOLOv5 640×640 72.1 72.8 76.6
YOLOv5s 640×640 72.8 69.4 75.3
YOLOv4-Tiny 640×640 34.5 81.8 66.8
YOLOv3-Tiny 640×640 60.3 62.2 62.5
YOLOv5l 640×640 75.1 74.7 79.4
YOLOv3-SPP 640×640 74.9 75.8 79.3

Tab.4

Comparison of performance of models"

模型 参数量/
107
浮点型计
算量/
(109次)
模型体积/
MB
推理时
间/ms
MV3L-YOLOv5 5.2 10.2 10.27 13.3
YOLOv5s 7.2 16.7 13.94 7.4
YOLOv4-Tiny 6.1 12.9 24.16 5.7
YOLOv3-Tiny 8.7 13.0 16.65 5.3
YOLOv5l 47.1 115.2 90.15 25.3
YOLOv3-SPP 62.7 155.9 119.80 27.0

Fig.4

Comparison of clothing detection results of two models. (a) Detection results of YOLOv5s;(b) Detection results of MV3L-YOLOv5"

Tab.5

Design of ablation experiment"

实验
序号
模型 LS Soft NMS NMW NMS
YOLOv5s × × ×
YOLOv5s × ×
MobileNetV3_Small-YOLOv5 × × ×
MobileNetV3_Small-YOLOv5 × ×
MobileNetV3_Large-YOLOv5 × ×
MobileNetV3_Large-YOLOv5 × ×
MobileNetV3_Large-YOLOv5 × × ×
MV3L-YOLOv5(ours) × ×

Tab.6

Results of ablation experiment"

实验
序号
尺寸/
像素
精确
率/%
召回
率/%
PmA/
%
模型体
积/MB
处理时
间/ms
640×640 72.8 69.4 75.3 13.94 1.5
640×640 69.5 72.8 75.6 13.94 1.7
640×640 68.3 67.6 71.4 7.06 1.6
640×640 69.4 66.4 71.6 7.06 1.6
640×640 70.9 74.2 75.9 10.27 27.4
640×640 71.3 72.8 76.5 10.27 29.0
640×640 72.6 71.6 76.5 10.27 1.5
640×640 72.1 72.8 76.6 10.27 1.5
[1] 魏芬, 刘建平, 徐松松, 等. 基于多特征值的服装目标检测与识别算法[J]. 实验室研究与探索, 2016, 35(5):118-122.
WEI Fen, LIU Jianping, XU Songsong, et al. Research on clothing detection and recognition based on characteristic values[J]. Research and Exploration in Laboratory, 2016, 35(5):118-122.
[2] 李东, 万贤福, 汪军. 采用傅里叶描述子和支持向量机的服装款式识别方法[J]. 纺织学报, 2017, 38(5):122-127.
LI Dong, WAN Xianfu, WANG Jun. Clothing style recognition approach using fourier descriptors and support vector machines[J]. Journal of Textile Research, 2017, 38(5):122-127.
[3] REN Shaoqing, HE Kaiming, GIRSHICK Ross, et al. Faster R-CNN: towards real-time object detection withregion proposal networks[J]. IEEE Computer Society, 2017, 39(6): 1137-1149.
[4] HE Kaiming, GKIOXARI G, DOLLÁR P, et al. Mask R-CNN[C]// IEEE Conference on Computer Vision and Pattern Recognition. Piscataway, NJ: IEEE, 2017: 2980-2988.
[5] LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot multibox detector[C]// Proceedings of European Conference on Computer Vision Berlin. German: Springer, 2016: 21-37.
[6] 刘正东, 刘以涵, 王首人. 西装识别的深度学习方法[J]. 纺织学报, 2019, 40(4): 158-164.
LIU Zhengdong, LIU Yihan, WANG Shouren. Depth learning method for suit detection in images[J]. Journal of Textile Research, 2019, 40(4): 158-164.
doi: 10.1177/004051757004000209
[7] SIDNEV A, KRAPIVIN A, TRUSHKOV A, et al. Deep Mark++: real-time clothing detection at the edge[C]// Proceedings of Winter Conference on Applications of Computer Vision. Piscataway, NJ: IEEE, 2021:2979-2987.
[8] HOWARD A, SANDLER M, CHEN Bo, et al. Searching for mobileNetV3[C]// Proceedings of IEEE International Conference on Computer Vision. Piscataway, NJ: IEEE, 2019:1314-1324.
[9] LIN T Y, DOLLÁR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]// Proceedings of IEEE Conference on Computer Vision and Pattern Recognition. Piscataway, NJ: IEEE, 2017: 936-944.
[10] LIU Shu, QI Lu, QIN Haifang, et al. Path aggregation network for instance segmentation[C]// Proceedings of IEEE/CVF Conference on Computer Vision and Pattern Recognition. Los Alamitos, CA: IEEE Computer Society, 2018:8759-8768.
[11] GE Yuying, ZHANG Ruimao, WANG Xiaogang, et al. DeepFashion2: a versatile benchmark for detection, pose estimation, segmentation and re-identification of clothing images[C]// Proceedings of IEEE/CVF Conference on Computer Vision and Pattern Recognition. Los Alamitos, CA: IEEE Computer Society, 2019: 5332-5340.
[12] ZHENG Zhaohui, WANG Ping, LIU Wei, et al. Distance-IoU loss: faster and better learning for boundingbox regression[C]// Proceedings of AAAI Conference on Artificial Intelligence. Menlo Park: AAAI Press, 2020: 12993-13000.
[1] JIANG Hui, MA Biao. Style similarity algorithm based on clothing style [J]. Journal of Textile Research, 2021, 42(11): 129-136.
[2] YANG Zhengyan, XUE Wenliang, ZHANG Chuanxiong, DING Yi, MA Yanxue. Recommendations for user's bottoms matching based on generative adversarial networks [J]. Journal of Textile Research, 2021, 42(07): 164-168.
[3] XU Qian, CHEN Minzhi. Garment grain balance evaluation system based on deep learning [J]. Journal of Textile Research, 2019, 40(10): 191-195.
[4] LIU Zhengdong, LIU Yihan, WANG Shouren. Depth learning method for suit detection in images [J]. Journal of Textile Research, 2019, 40(04): 158-164.
[5] . Fabric pilling object detection using scale-space extrema [J]. JOURNAL OF TEXTILE RESEARCH, 2013, 34(7): 45-51.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!