Journal of Textile Research ›› 2025, Vol. 46 ›› Issue (03): 56-63.doi: 10.13475/j.fzxb.20240301901

• Textile Engineering • Previous Articles     Next Articles

Image detection of cotton nep in carding net based on improved YOLOv8

BAI Yuwei, XU Jian(), ZHU Yaolin, DING Zhanbo, LIU Chenyu   

  1. School of Electronics and Information, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2024-03-07 Revised:2024-05-08 Online:2025-03-15 Published:2025-04-16
  • Contact: XU Jian E-mail:xujian@xpu.edu.cn

Abstract:

Objective In order to improve the nep detection using deep learning with minimal computing resources and to achieve real-time online detection using embedded devices and mobile terminals, this research proposed an improved YOLOv8 detection method.

Method Lightweight network MobileNetv3_Small was used as YOLOv8 backbone network so as to reduce the number of parameters. The self-improved CA (coordinate attention) model was adopted to replace the SE (squeeze-and-excitation)attention mechanism model in MobileNetv3 so as to improve the accuracy of nep detection. EIoU loss function substituted CIoU loss function was employed to retain more effective information in data processing.

Results The dataset constructed includes three target objects, which were named lumpy nep, strip nep and cotton miscellaneous matters. Different light intensities and camera orientation on model detection effec was studied by using test set. The experimental results show that no missed detections and false detections of all target objects was found under different light intensities and different camera orientations. The average accuracy of improved YOLOv8 model reached 95.8%, with an increase of 2.6% compared with the reported model. Compared with the improved YOLOv8, YOLOv7, YOLOv5 and Faster R-CNN network models, the improved YOLOv8 network model involved fewer parameters but with higher average accuracy. According to the average accuracy of the improved YOLOv8 model for each type, the detection rate reached more than 95.1% with high accuracy. The improved model ablation experiments show when MobileNetv3 replaced the YOLOv8 backbone network, the parameter quantity is greatly reduced, and it was found from the comparison experiment between the loss function CIoU and EIoU that when the loss function is EIoU, the average accuracy of model detection is higher than CIoU. In addition, the number of parameters in the model became smaller, which is beneficial for embedded equipment and would satisfy the actual industrial production requirements.

Conclusion A nep detection method based on improved YOLOv8 model is proposed combining the characteristics of nep. By improving the original YOLOv8 model and inducting improved MobileNetv3 module, the accuracy of the model is improved, and the number of parameters is reduced, which benefits effective detection. The improved model can effectively reduce the parameter number and make the detection accuracy improved. Compared with the classic detection methods, the accuracy of the proposed model is higher, and the parameters get fewer. This method can be used with mobile devices or built-in devices for intelligent factory equipment.

Key words: carding net, deep learning, object detection, nep, lightweight model, YOLOv8, image detection

CLC Number: 

  • TP391

Tab.1

Improved structure of YOLOv8 backbone"

网络结构 输入分辨率/
像素
输出通道数 网络层数
Conv3×3 640×640 16 1
Bottleneck3×3 320×320 16 1
Bottleneck3×3 160×160 24 1
Bottleneck3×3 80×80 24 1
Bottleneck5×5 80×80 40 1
Bottleneck5×5 40×40 40 2
Bottleneck5×5 40×40 48 2
Bottleneck5×5 40×40 96 1
Bottleneck5×5 20×20 96 2

Fig.1

Improved CA module structure"

Fig.2

Detection process flow"

Fig.3

Cotton knots labeling chart"

Fig.4

Model detecting effect before improvement. (a) Strip cotton nep; (b) Cotton miscellaneous matters; (c) Lumpy cotton nep; (d) Cotton nep and miscellaneous matters"

Fig.5

Model detecting effect after improvement. (a) Strips cotton nep; (b) Cotton miscellaneous matters; (c) Lumpy cotton nep; (d) Cotton nep and miscellaneous matters"

Fig.6

Detect results at different camera direction. (a) Rotated by 90°; (b) Rotated by 180°; (c) Rotated by 270°"

Fig.7

Detection results under different lighting conditions. (a) Weak lighting; (b) Normal lighting; (c) Bright lighting"

Tab.2

Improved YOLOv8 classification detection effect"

棉结类别 训练集标签数量/个 精确率/%
团状棉结 1 924 95.1
条状棉结 516 96.1
棉杂 531 96.3

Tab.3

Detection effect by different models"

模型 参数量/
106
精确率/
%
召回率/
%
平均准确
率均值/%
推理
时间/s
本文算法 1.98 93.4 90.2 95.8 0.015
YOLOv8 3.01 87.7 88.9 93.2 0.024
YOLOv7 4.80 93.3 87.7 91.3 0.023
YOLOv5 7.01 89.8 86.3 90.6 0.019
Faster R-CNN 137.10 73.9 91.8 92.4 0.032

Tab.4

Results of ablation experiment"

模型编号 模型名称 CA CA+sigmoid EIoU 精确率/% 召回率/% 平均准确率均值/% 模型计算量/106
1 YOLOv8 × × × 87.7 88.9 93.2 3.01
2 YOLOv8-M × × × 93.4 93.6 95.4 2.34
3 YOLOv8-M × × 87.5 95.5 95.5 1.98
4 YOLOv8-M × 93.6 93.9 95.7 1.98
5 YOLOv8-E × × 92.6 90.3 95.6 3.01
6 YOLOv8-M-E 93.4 90.2 95.8 1.98
[1] 董奎勇. 中国棉纺织工业发展历程与创新之路[J]. 棉纺织技术, 2023, 51(10):5-13.
DONG Kuiyong. Development course and innovation road of china cotton textile industry[J]. Cotton Textile Technology, 2023, 51 (10):5-13.
[2] 倪锦文. 纱线棉结形成原因的研究与减少措施的探索[D]. 天津: 天津工业大学, 2017:10.
NI Jinwen. Study on the causes of yarn neps formation and exploration of measures to reduce them[D]. Tianjin: Tiangong University, 2017:10.
[3] 陈玉峰, 周茂榕. 梳棉工序棉结与短绒控制的矛盾分析[J]. 棉纺织技术, 2018, 46 (12): 9-12.
CHEN Yufeng, ZHOU Maorong. Contradiction analysis of nep and short fiber control in carding process[J]. Cotton Textile Technology, 2018, 46 (12): 9-12.
[4] 王延蒙, 付晓艳, 张朝彪. 基于线阵CCD的纱线常发性疵点检测研究[J]. 纺织器材, 2022, 49 (6): 5-8.
WANG Yanmeng, FU Xiaoyan, ZHANG Chaobiao. Research on yarn recurrent defect detection based on linear CCD[J]. Textile Accessories, 2022, 49 (6): 5-8.
[5] 周建, 潘如如, 高卫东. 机器视觉在纺织中的应用现状与发展趋势[J]. 棉纺织技术, 2019, 47(2):15-17.
ZHOU Jian, PAN Ruru, GAO Weidong. Application status and development trend of machine vision in textile industry[J]. Cotton Textile Technology, 2019, 47 (2):15-17.
[6] 陈俊琰. 梳棉机棉网质量计算机视觉检测系统研究[D]. 上海: 东华大学, 2014:53.
CHEN Junyan. Study on computer vision inspection system for web quality of carding machine[D]. Shanghai: Donghua University, 2014:53.
[7] HOWARD A, SANDLER M, CHU G, et al. Searching for MobileNetV3[C]// Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV). Seoul: IEEE, 2019:1314-1324.
[8] HU J, SHEN L, ALBANIE S, et al. Squeeze-and-Excitation networks[J] IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(8): 2011-2023.
doi: 10.1109/TPAMI.2019.2913372 pmid: 31034408
[9] ZHENG Zhaohui, WANG Ping, REN Dongwei, et al. Enhancing geometric factors in model learning and inference for object detection and instance segmentation[J]. IEEE Transactions on Cybernetics, 2021, 52(8): 8574-8586.
[10] ZHANG Yifan, REN Weiqiang, ZHANG Zhang, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506: 146-157.
[11] 徐健, 胡道杰, 刘秀平, 等. 基于改进型RFB-MobileNetV3的棉杂图像检测[J]. 纺织学报, 2023, 44(1):179-187.
XU Jian, HU Daojie, LIU Xiuping, et al. Cotton clutter detection based on improved RFB-MobileNetV3[J]. Journal of Textile Research, 2023, 44(1):179-187.
[12] 陈海永, 刘新如. 交叉门控融合的改进语义分割网络及应用[J]. 重庆理工大学学报(自然科学), 2023, 37(6):187-195.
CHEN Haiyong, LIU Xinru. Improved semantic segmentation network based on cross-gated fusion and its application[J]. Journal of Chongqing University of Technology (Natural Science Edition), 2023, 37(6):187-195.
[1] HUANG Xiaoyuan, HOU Jue, YANG Yang, LIU Zheng. Automatic generation of high-precision garment patterns based on improved deep learning model [J]. Journal of Textile Research, 2025, 46(02): 236-243.
[2] CAI Liling, WANG Mei, SHAO Yibing, CHEN Wei, CAO Huaqing, JI Xiaofen. Intelligent customization recommendation for traditional Hanfu based on improved stack-generative adversarial network [J]. Journal of Textile Research, 2024, 45(12): 180-188.
[3] LIU Yanping, GUO Peiyao, WU Ying. Research progress in deep learning technology for fabric defect detection [J]. Journal of Textile Research, 2024, 45(12): 234-242.
[4] LI Yang, ZHANG Yongchao, PENG Laihu, HU Xudong, YUAN Yanhong. Fabric defect detection based on improved cross-scene Beetle global search algorithm [J]. Journal of Textile Research, 2024, 45(10): 89-94.
[5] LU Yinwen, HOU Jue, YANG Yang, GU Bingfei, ZHANG Hongwei, LIU Zheng. Single dress image video synthesis based on pose embedding and multi-scale attention [J]. Journal of Textile Research, 2024, 45(07): 165-172.
[6] ZHU Lingyun, WANG Chenyu, ZHAO Yueying. Detection of fabric surface defects based on multi-metric-multi-model image voting [J]. Journal of Textile Research, 2024, 45(06): 89-97.
[7] WEN Jiaqi, LI Xinrong, FENG Wenqian, LI Hansen. Rapid extraction of edge contours of printed fabrics [J]. Journal of Textile Research, 2024, 45(05): 165-173.
[8] LU Weijian, TU Jiajia, WANG Junru, HAN Sijie, SHI Weimin. Model for empty bobbin recognition based on improved residual network [J]. Journal of Textile Research, 2024, 45(01): 194-202.
[9] CHI Panpan, MEI Chennan, WANG Yan, XIAO Hong, ZHONG Yueqi. Single soldier camouflage small target detection based on boundary-filling [J]. Journal of Textile Research, 2024, 45(01): 112-119.
[10] YU Xuliang, CONG Honglian, SUN Fei, DONG Zhijia. Design and application of functional knitted fabric imitating nepenthe mouth structure [J]. Journal of Textile Research, 2023, 44(07): 72-78.
[11] LI Xueliang, DU Yuhong, REN Weijia, ZUO Hengli. Classification and identification of foreign fibers based on near-infrared spectroscopy and ResNet [J]. Journal of Textile Research, 2023, 44(05): 84-92.
[12] YANG Hongmai, ZHANG Xiaodong, YAN Ning, ZHU Linlin, LI Na'na. Robustness algorithm for online yarn breakage detection in warp knitting machines [J]. Journal of Textile Research, 2023, 44(05): 139-146.
[13] GU Bingfei, ZHANG Jian, XU Kaiyi, ZHAO Songling, YE Fan, HOU Jue. Human contour and parameter extraction from complex background [J]. Journal of Textile Research, 2023, 44(03): 168-175.
[14] LI Yang, PENG Laihu, LI Jianqiang, LIU Jianting, ZHENG Qiuyang, HU Xudong. Fabric defect detection based on deep-belief network [J]. Journal of Textile Research, 2023, 44(02): 143-150.
[15] WANG Bin, LI Min, LEI Chenglin, HE Ruhan. Research progress in fabric defect detection based on deep learning [J]. Journal of Textile Research, 2023, 44(01): 219-227.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!