纺织学报 ›› 2023, Vol. 44 ›› Issue (12): 35-42.doi: 10.13475/j.fzxb.20220702801

• 纺织工程 • 上一篇    下一篇

基于残差结构的棉花异性纤维检测算法

师红宇1(), 位营杰1, 管声启2, 李怡1   

  1. 1.西安工程大学 计算机科学学院, 陕西 西安 710048
    2.西安工程大学 机电工程学院, 陕西 西安 710048
  • 收稿日期:2022-12-11 修回日期:2023-01-02 出版日期:2023-12-15 发布日期:2024-01-22
  • 作者简介:师红宇(1981—),女,高级工程师,硕士。主要研究方向为图像处理、深度学习和智能检测。E-mail:shy510213@163.com
  • 基金资助:
    陕西省重点研发计划项目(2022GY-058);西安市科技创新人才服务企业项目(2020KJRC0022)

Cotton foreign fibers detection algorithm based on residual structure

SHI Hongyu1(), WEI Yingjie1, GUAN Shengqi2, LI Yi1   

  1. 1. School of Computer Science, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
    2. School of Mechanical & Electronic Engineering, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2022-12-11 Revised:2023-01-02 Published:2023-12-15 Online:2024-01-22

摘要:

针对棉花中异性纤维检测精度低、异性纤维隐藏或边角位置不易识别等原因导致检测效果不佳的问题,提出一种基于残差结构的棉花异性纤维检测算法。首先,针对异性纤维检测目标,提出一种棉花异性纤维在线检测方案;其次,针对异性纤维颜色、纹理、位置等特征,构建深浅层混合数据集;在此基础上设计了残差结构的异性纤维检测网络模型算法,解决了现有检测算法精度低、异性纤维隐藏或边角位置的问题;最后,将该算法与传统经典算法对比实验。结果表明:在深浅层混合数据集下,与经典算法对比,该算法具有较高的准确性和实时性,其平均检测准确率达到88.48%,1张图像的检测速度为0.019 s,满足工业现场实时检测需求,为棉花中异性纤维检测提供了一种新方法。

关键词: 异性纤维检测, 棉花, 注意力机制, 残差结构, 深度可分离卷积, 网络模型

Abstract:

Objective Aiming at the low detection accuracy of foreign fibers in cotton, and the poor detection effect caused by the hidden or corner position of foreign fibers, the author propose cotton foreign fibers detection algorithm based on residual structure. Its design is based on the characteristics of the different colors and shapes of foreign fibers in cotton, as well as the different shades and light layers of foreign fibers.
Method For the detection target, an online detection scheme for cotton foreign fibers was proposed. A mixed dataset of deep and shallow layers was constructed based on the color, texture, position, and other characteristics of foreign fibers. Building upon this, a foreign fiber detection network model algorithm with a residual structure was designed, addressing issues such as low accuracy in existing detection algorithms and the presence of hidden or corner-positioned foreign fibers.
Results Ultimately, the dataset constructed in this paper includes five common types of foreign fibers, which are plastic film, plastic rope, polypropylene thread, polyester thread, and hair strand. In order to enrich the dataset and increase the validity of the experiment, the dataset also contains samples with no foreign fibers. Comparative experiments are carried out by using the newly developed detection algorithm and other classical algorithms. In the constructed dataset, the experimental results show that the detection accuracy of foreign fibers and plastic film are as high as 92.81% and 95.76%, respectively, while the identification accuracy of hair, polypropylene thread and polyester wire is low (Tab. 1). Plastic film and plastic rope, which are larger than hair strand, are easier to detect. In industry, there are foreign fibers such as hair, polypropylene thread, polyester thread, etc. in the deep and shallow layers of cotton, and the characteristics of these deep foreign fibers are not obvious. Especially the targets of smaller hair strands, After a series of convolutional extraction features. The deep information is more abstracted, so there is less semantic information of such small target objects. In this paper, the attention mechanism is introduced into the residual structure, and different weights are given to the feature map to enhance the representation ability of the key feature of foreign fibers. Experimental results showed that the algorithm reported in this paper achieved remarkable success on deep and shallow datasets. The average detection accuracy of the deep and shallow dataset was 88.48% (Tab. 3). In addition, the algorithm performed well when processing a single image, with an average detection speed of only 0.019 s per image. In comparison to classical algorithms such as GoogleNet, MobileNetV1, MobileNetV2 and EfficientNet, the algorithm improved accuracy by 10.85%, 3.32%, 26.47% and 26.96%, respectively. Compared to MobileNetV2 and EfficientNet, the algorithm tested a single image with shorter running times and higher accuracy. Hence, the algorithm offered a balance between high accuracy and moderate detection speed in foreign fiber detection, catering to the real-time requirements of the industry. It addressed the issues of low accuracy in existing detection algorithms and the presence of hidden or corner-positioned foreign fibers. Furthermore, it introduced a novel approach to foreign fiber detection in cotton.
Conclusion In this paper, the algorithm not only achieves a high detection effect on shallow cotton foreign fibers dataset, but also achieves a good results on the mixed dataset of deep and shallow layers cotton foreign fiber. However, for the small objects in the deep depth of the actual industry, the method in this paper will also have false detection and missed detection. In the future, the network structure and network parameters will be optimized to improve the real-time detection of foreign fibers in cotton while maintaining a high detection accuracy.

Key words: foreign fiber detection, cotton, attention mechanism, residual structure, depth wise separable convolution, network model

中图分类号: 

  • TP391

图1

棉花异性纤维在线检测方案"

图2

部分异性纤维原始图像"

图3

异性纤维检测网络模型"

图4

训练集和验证集的准确率和损失值"

表1

深浅混合测试集准确率"

异性纤维类别 张数 准确率/%
无异性纤维 167 92.81
塑料薄膜 165 95.76
塑料绳 165 90.91
丙纶纱线 168 89.88
涤纶纱线 160 84.38
头发丝 165 76.97
合计 990 88.48

图5

中间特征图分析"

表2

部分浅层数据集下测试集检测准确率"

异性纤维类别 张数 准确率/%
塑料薄膜 120 97.50
塑料绳 105 97.14
丙纶纱线 93 100.00
合计 318 98.21

表3

深浅混合数据集下各算法异性纤维检测结果对比"

检测算法 输入 准确率/% 模型大小/MB 时间/s
GoogleNet[13] RGB 79.82 23.568 0.020
MobileNetV1[12] RGB 85.64 2.161 0.070
MobileNetV2[16] RGB 69.96 8.875 0.011
EfficientNet[17] RGB 69.69 13.878 0.017
本文算法 RGB 88.48 17.902 0.019
[1] 汪文忠. 浅谈棉花异性纤维含量检验技术[J]. 中国棉花加工, 2019(3): 24-25.
WANG Wenzhong. Talking about the testing technology of cotton foreign fiber fontent[J]. China Cotton Processing, 2019(3): 24-25.
[2] 陈亚军, 吴婷荣, 史书伟, 等. 基于光学成像的棉花异性纤维检测方法研究进展[J]. 激光与光电子学进展, 2021, 58(16):138-154.
CHEN Yajun, WU Tingrong, SHI Shuwei, et al. Review of cotton foreign fiber detection method using optical imaging[J]. Laser & Optoelectronics Progress, 2021, 58(16): 138-154.
[3] 任维佳, 杜玉红, 左恒力, 等. 棉花中异性纤维检测图像分割和边缘检测方法研究进展[J]. 纺织学报, 2021, 42(12): 196-204.
REN Weijia, DU Yuhong, ZUO Hengli, et al. Research progress in image segmentation and edge detection methods for alien fibers detection in cotton[J]. Journal of Textile Research, 2021, 42(12): 196-204.
[4] WANG Y, HAO Z, ZUO F, et al. A fabric defect detection system based omproved YOLOv5 detector[C]// Journal of Physics: Conference Series. Lanzhou: IOP Publishing, 2021. DOI: 10.1088/1742-6596/2010/1/012191.
[5] 杜玉红, 董超群, 赵地, 等. 改进Faster RCNN模型在棉花异性纤维识别中的应用[J]. 激光与光电子学进展, 2020, 57(12): 132-141.
DU Yuhong, DONG Chaoqun, ZHAO Di, et al. Application of improved faster RCNN model for foreign fiber identification in cotton[J]. Laser & Optoelectronics Progress, 2020, 57(12): 132-141.
[6] 巫明秀, 吴谨, 张晨, 等. 基于改进YOLOv3的棉花异性纤维检测[J]. 液晶与显示, 2020, 35(11): 1195-1203.
WU Mingxiu, WU Jin, ZHANG Chen, et al. Detection of foreign fiber in cotton based on improved YOLOv3[J]. Chinese Journal of Liquid Crystals and Displays, 2020, 35(11): 1195-1203.
[7] ZHAO Xuehua, GUO Xiangyun, LUO Jie. et al. Efficient detection method for foreign fibers in cotton[J]. Information Processing in Agriculture, 2018, 5(3): 320-328.
[8] 赵学华, 李道亮, 杨文柱, 等. 基于改进蚁群算法的棉花异性纤维目标特征选择方法[J]. 农业机械学报, 2011, 41(4): 173-178.
ZHAO Xuehua, LI Daoliang, YANG Wenzhu, et al. Feature selection for cotton foreign fiber objects based on improved ant colony algorithm[J]. Transactions of the Chinese Society for Agricultural Machinery, 2011, 41(4): 173-178.
[9] 张云, 许江淳, 王志伟, 等. 基于机器视觉的棉花异性纤维检测技术优化研究[J]. 中国农机化学报, 2018, 39(9): 61-65.
ZHANG Yun, XU Jiangchun, WANG Zhiwei, et al. Optimization of cotton heterosexual detection technology based on machine vision[J]. Journal of Chinese Agricultural Mechanization, 2018, 39(9): 61-65.
[10] 戴永成, 焦智. 基于DSP的棉花异性纤维实时分拣算法研究与实现[J]. 科技通报, 2017, 33(5): 203-207.
DAI Yongcheng, JIAO Zhi. Research and implementation of cotton foreign fiber real-time sorting algorithm based on DSP[J]. Bulletin of Science and Technology, 2017, 33(5): 203-207.
[11] 何晓昀, 韦平, 张林, 等. 基于深度学习的籽棉中异性纤维检测方法[J]. 纺织学报, 2018, 39(6): 131-135.
HE Xiaoyun, WEI Ping, ZHANG Lin, et al. Detection method of foreign fibers in seed cotton based on deep-learning[J]. Journal of Textile Research, 2018, 39(6):131-135.
[12] CHOLLET F. Xception: deep learning with depthwise separable convolutions[C]// IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE, 2017: 1800-1807.
[13] SZEGEDY C, LIU W, JIA Y Q, et al. Going deeper with convolutions[C]// IEEE Conference on Computer Vision and Pattern Recognition. Boston: IEEE, 2015: 1-9.
[14] HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Los Alamitos: IEEE Computer Society Press, 2016: 770-778.
[15] WOO S, PARK J, LEE J Y, et al. CBAM: convolutional block attention module[C]// Proceedings of the European Conference on Computer Vision. Seoul: ECCV, 2018: 3-19.
[16] SANDLER M, HOWARD A, ZHU M, et al. Mobilenetv2: inverted residuals and linear bottlenecks[C]// Proceedings of the IEEE conference on computer vision and pattern recognition. Salt Lake City: IEEE, 2018: 4510-4520.
[17] TAN M, LE Q V. EfficientNet: rethinking model scaling for convolutional neural networks[C]// Proceedings of International Conference on Machine Learning. Vancouver: PMLR, 2019: 6105-6114.
[1] 马创佳, 齐立哲, 高晓飞, 王子恒, 孙云权. 基于改进YOLOv4-Tiny的缝纫线迹质量检测方法[J]. 纺织学报, 2023, 44(08): 181-188.
[2] 付晗, 胡峰, 龚杰, 余联庆. 面向织物疵点检测的缺陷重构方法[J]. 纺织学报, 2023, 44(07): 103-109.
[3] 袁甜甜, 王鑫, 罗炜豪, 梅琛楠, 韦京艳, 钟跃崎. 基于注意力机制和视觉转换器的三维虚拟试衣网络[J]. 纺织学报, 2023, 44(07): 192-198.
[4] 李学良, 杜玉红, 任维佳, 左恒力. 基于近红外光谱和残差神经网络的异性纤维分类识别[J]. 纺织学报, 2023, 44(05): 84-92.
[5] 陈佳, 杨聪聪, 刘军平, 何儒汉, 梁金星. 手绘草图到服装图像的跨域生成[J]. 纺织学报, 2023, 44(01): 171-178.
[6] 顾梅花, 刘杰, 李立瑶, 崔琳. 结合特征学习与注意力机制的服装图像分割[J]. 纺织学报, 2022, 43(11): 163-171.
[7] 吴帆, 李勇, 陈晓川, 汪军, 徐敏俊. 基于三维编织模型的棉纤维集合体压缩过程有限元建模与仿真[J]. 纺织学报, 2022, 43(09): 89-94.
[8] 任艳博, 蒋超, 王教庆, 俞琳, 王园园. 基于聚类算法和色彩网络的蝴蝶色彩分析及应用[J]. 纺织学报, 2021, 42(05): 103-108.
[9] 董超群, 杜玉红, 任维佳, 赵地. 应用光学成像技术检测棉花中异性纤维的研究进展[J]. 纺织学报, 2020, 41(06): 183-189.
[10] 刘建勇 黄烨 谭学强. 色纺纱的计算机配色研究进展[J]. 纺织学报, 2018, 39(11): 176-184.
[11] 陈晓妮 汪军 陈庆东. 棉花检测能力认证活动中统计模型的应用[J]. 纺织学报, 2012, 33(10): 33-36.
[12] 张立杰 寇纪淞 李敏强 彭利. 基于协整理论的棉花价格与纺织生产相关性[J]. 纺织学报, 2012, 33(10): 147-152.
[13] 叶炜. 基于多波段传感器技术的新型棉花色泽仪研制[J]. 纺织学报, 2010, 31(4): 113-116.
[14] 徐红;夏鑫. 机采棉与手采棉的性能比较[J]. 纺织学报, 2009, 30(9): 5-10.
[15] 唐虹.;张渭源. 基于面料性能的半紧身裙造型特征及预测模型[J]. 纺织学报, 2008, 29(6): 88-91.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!