纺织学报 ›› 2022, Vol. 43 ›› Issue (10): 155-160.doi: 10.13475/j.fzxb.20210809306

• 服装工程 • 上一篇    下一篇

改进YOLOv5网络的轻量级服装目标检测方法

陈金广1(), 李雪1, 邵景峰2, 马丽丽1   

  1. 1.西安工程大学 计算机科学学院, 陕西 西安 710048
    2.西安工程大学 管理学院, 陕西 西安 710048
  • 收稿日期:2021-08-24 修回日期:2022-06-27 出版日期:2022-10-15 发布日期:2022-10-28
  • 作者简介:陈金广(1977—),男,教授,博士。主要研究方向为信息融合、机器学习、计算机应用。E-mail: xacjg@163.com
  • 基金资助:
    陕西省重点研发计划项目(2020GY-122);陕西省教育厅科研计划项目(21JP049);西安市科技计划项目(2020KJRC0018);西安工程大学研究生创新基金项目(chx2021026)

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 Published:2022-10-15 Online:2022-10-28

摘要:

为进一步降低基于深度学习的服装目标检测模型对计算资源的占用,提出一种改进的轻量级服装目标检测方法MV3L-YOLOv5。首先使用移动网络MobileNetV3_Large构造YOLOv5的主干网络;然后在训练阶段使用标签平滑策略,以增强模型泛化能力;最后使用数据增强技术弥补DeepFashion2数据集中不同服装类别图像数量不均衡问题。实验结果表明:MV3L-YOLOv5的模型体积为10.27 MB,浮点型计算量为10.2×109次,平均精度均值为76.6%。与YOLOv5系列最轻量的YOLOv5s网络相比,模型体积压缩了26.4%,浮点型计算量减少了39%,同时平均精度均值提高了1.3%。改进后的算法在服装图像的目标检测方面效果有所提升,且模型更加轻量,适合部署在资源有限的设备中。

关键词: 深度学习, 目标检测, 服装图像, 轻量级网络, YOLOv5

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

中图分类号: 

  • TS941

图1

MV3L-YOLOv5网络结构"

图2

数据增强图片示例"

表1

训练集和验证集中服装目标的数量分布"

服装类别 类别序号 训练集/个 验证集/个
短袖衫 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

图3

模型训练损失和平均精度均值PmA变化曲线"

表2

模型改进前后在每种服装类别上的PA值对比"

服装类别 平均精度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

表3

模型训练结果对比"

模型 尺寸/像素 精准
率/%
召回
率/%
平均检测精度
均值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

表4

模型性能对比"

模型 参数量/
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

图4

2种模型的服装目标检测效果对比"

表5

消融实验设计"

实验
序号
模型 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) × ×

表6

消融实验结果"

实验
序号
尺寸/
像素
精确
率/%
召回
率/%
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] 江慧, 马彪. 基于服装风格的款式相似度算法[J]. 纺织学报, 2021, 42(11): 129-136.
[2] 杨争妍, 薛文良, 张传雄, 丁亦, 马颜雪. 基于生成式对抗网络的用户下装搭配推荐[J]. 纺织学报, 2021, 42(07): 164-168.
[3] 王晓华, 姚炜铭, 王文杰, 张蕾, 李鹏飞. 基于改进YOLO深度卷积神经网络的缝纫手势检测[J]. 纺织学报, 2020, 41(04): 142-148.
[4] 许倩, 陈敏之. 基于深度学习的服装丝缕平衡性评价系统[J]. 纺织学报, 2019, 40(10): 191-195.
[5] 刘正东, 刘以涵, 王首人. 西装识别的深度学习方法[J]. 纺织学报, 2019, 40(04): 158-164.
[6] 汪珊娜 张华熊 康锋. 基于卷积神经网络的领带花型情感分类[J]. 纺织学报, 2018, 39(08): 117-123.
[7] 何晓昀 韦平 张林 邓斌攸 潘云峰 苏真伟. 基于深度学习的籽棉中异性纤维检测方法[J]. 纺织学报, 2018, 39(06): 131-135.
[8] 徐增波 周胜. 基于尺度-空间极值的织物起球目标检测[J]. 纺织学报, 2013, 34(7): 45-51.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!