纺织学报 ›› 2026, Vol. 47 ›› Issue (1): 80-88.doi: 10.13475/j.fzxb.20250501801

• 纤维材料 • 上一篇    下一篇

基于频域景深合成和改进SOLOv2模型的羊毛羊绒纤维识别算法

叶泽南1, 李子印1(), 何健郡1, 汪小东2, 叶飞2, 刘伟红2   

  1. 1.中国计量大学 光学与电子科技学院, 浙江 杭州 310018
    2.湖州市质量技术监督检测研究院 (湖州市纤维质量监测中心), 浙江 湖州 313099
  • 收稿日期:2025-05-14 修回日期:2025-11-04 出版日期:2026-01-15 发布日期:2026-01-15
  • 通讯作者: 李子印(1978—),男,副教授,博士。主要研究方向为机器视觉。E-mail:liziyin@cjlu.edu.cn
  • 作者简介:叶泽南(2001—),男,硕士生。主要研究方向为机器视觉。
  • 基金资助:
    浙江省市场监督管理局科技计划项目(ZC2025032);浙江省市场监督管理局青年科技项目(QN2023444)

Wool and cashmere fiber recognition algorithm based on frequency-domain field depth fusion and improved SOLOv2 model

YE Zenan1, LI Ziyin1(), HE Jianjun1, WANG Xiaodong2, YE Fei2, LIU Weihong2   

  1. 1. College of Optics and Electronics, China Jiliang University, Hangzhou, Zhejiang 310018, China
    2. Huzhou Institute of Quality and Technical Supervision and Inspection(Huzhou Fiber Quality Monitoring Center), Huzhou, Zhejiang 313099, China
  • Received:2025-05-14 Revised:2025-11-04 Published:2026-01-15 Online:2026-01-15

摘要:

针对现有羊毛羊绒纤维识别方法中存在的训练数据规模小、对高分辨率图像依赖强以及交错纤维识别效果不佳的问题,提出了一种基于频域景深合成与改进SOLOv2模型的羊毛羊绒纤维识别算法。首先,采集多焦面的羊毛羊绒纤维图像,经过空域滤波与形态学处理提取纤维轮廓特征,随后将图像转换至频域,并利用高斯核算子进行融合,生成高质量纤维图像。在此基础上,对11 799张融合后的纤维图像进行准确标注,构建一个大规模、覆盖广泛的羊毛羊绒数据集。在SOLOv2算法的基础上,引入Swin Transformer作为主干网络,以提升局部建模与全局特征提取能力,同时采用PAFPN结构优化特征融合过程,增强多尺度特征表达能力。结合随机裁剪、随机翻转与随机高反差保留3种数据增强策略,进一步提升了模型的泛化性能。最终,在羊毛羊绒纤维数据集上的测试结果表明,所提出的改进SOLOv2模型能够实现对交错纤维的精细化识别,模型的平均准确度高达96.85%,相比SOLOv2模型提高了2.73%。

关键词: 纤维检测, 计算机视觉, 景深合成, 实例分割, SOLOv2模型, 纤维识别, 羊毛, 羊绒

Abstract:

Objective In order to address the persistent challenges in wool and cashmere fiber recognition in small training datasets, strong dependence on high-resolution microscopy, and poor performance with intertwined fibers, a novel recognition framework is proposed and validated. It integrates a frequency-domain multi-focus image fusion technique with an improved instance segmentation model SOLOv2. The framework aims to enhance source imagery quality and subsequently improve the segmentation accuracy and robustness of the model, providing a reliable technological solution for automated fiber analysis in industrial settings.

Method A series of multi-focus images of wool and cashmere fibers were captured and preprocessed using spatial filtering and morphological operations. These images were then fused in the frequency domain via a Fourier transform coupled with a Gaussian kernel filter to generate all-in-focus, high-quality representations. Building upon this, a comprehensive dataset comprising 11 799 precisely annotated images was constructed. The recognition model, built upon the SOLOv2 architecture, incorporates a Swin Transformer as its backbone for superior hierarchical feature extraction and replaces the standard Feature Pyramid Network (FPN) with a Path Aggregation Feature Pyramid Network (PAFPN) to enhance multi-scale feature fusion. In order to improve model generalization, a composite data augmentation strategy involving random cropping, flipping, and high pass was systematically employed during training.

Results In order to quantitatively evaluate the effectiveness of the proposed depth-of-field fusion algorithm, a comparative experiment was carefully designed and conducted on a set of multi-focus fiber images captured under identical microscopic conditions. This ensured fairness of comparison and eliminated potential biases caused by variations in illumination, magnification, or sample preparation. The proposed frequency-domain algorithm demonstrated clear superiority over conventional fusion methods, including wavelet transform and Laplacian pyramid fusion. By effectively combining high-frequency and low-frequency information, the algorithm produced fused images with both sharper edge detail and stronger structural integrity. Quantitative analysis further confirmed that the fused images achieved an average information entropy of 0.80, a spatial frequency of 153.57, and an average gradient of 126.01. Such metrics indicate that the fused images contain richer texture detail, clearer contours, and enhanced information content, all of which are critical for resolving ambiguous cases of overlapping and entangled fibers that frequently occur in textile inspection. The validated fusion method also enabled the creation of a large, high-quality dataset containing 11 799 samples, which served as a solid foundation for subsequent model training and evaluation. Building upon this dataset, the performance of the improved SOLOv2 model was rigorously assessed through comparative experiments with several established instance segmentation frameworks. The results showed that the proposed model significantly outperformed existing benchmarks, achieving a mean average precision (mAP) of 96.85% on the test set. This value was notably higher than those of Mask R-CNN, Yolact, and the original SOLOv2 with a ResNet-50 backbone. In order to disentangle the contributions of individual improvements, systematic ablation studies were conducted. Experimental results demonstrate that replacing the backbone with Swin Transformer significantly increased the mAP from 94.12% to 95.90%, fully verifying its superior capability in feature representation. Meanwhile, substituting the FPN structure with PAFPN improved the detection accuracy to 94.81%, confirming the positive contribution of enhanced multi-scale feature fusion to model performance. Under the synergistic effect of these two improvement strategies, the model achieved the final mAP of 96.85%. Qualitative evaluations complemented these quantitative results, revealing that the segmentation masks generated by the improved model exhibited smoother contours, higher fidelity to fiber boundaries, and a notable reduction of artifacts, particularly in challenging cases involving densely intertwined fibers where other models often failed.

Conclusion The empirical results conclusively demonstrate the efficacy of the proposed two-stage framework. The frequency-domain filtering-based depth-of-field fusion algorithm effectively overcomes the reliance on pristine and high-resolution imaging inherent in conventional methods, yielding superior image quality that facilitates subsequent analysis. Meanwhile, the improved SOLOv2 model, enhanced by Swin Transformer and PAFPN, excels at accurately identifying and segmenting interlaced fibers, producing high-quality masks with smooth, artifact-free edges. Achieving an average precision of 96.85% on the challenging wool and cashmere fiber recognition task validates the synergy between advanced image preprocessing and state-of-the-art network architecture. The developed solution not only presents a high-performance approach for a specific textile analysis problem but also provides valuable insights for other microscopic image segmentation tasks facing similar challenges.

Key words: fiber detection, computer vision, depth of field synthesis, instance segmentation, SOLOv2 model, fiber recognition, wool, cashmere

中图分类号: 

  • TS107.2

图1

不同Z位置的羊绒纤维图像(×800)"

图2

景深合成算法流程"

图3

原始纤维图像集"

图4

纤维轮廓提取"

图5

特征图"

图6

最终结果图"

图7

随机高反差保留效果图"

图8

基于改进SOLOv2的网络架构"

表1

主干网络结构"

阶段 图像块数量 通道数 层数 窗口大小
第1阶段 192×128 96 2 7×7
第2阶段 96×64 192 2 7×7
第3阶段 48×32 384 18 7×7
第4阶段 24×16 768 2 7×7

图9

3种算法结果对比图"

表2

景深合成算法测试结果"

类别 信息熵 空间频率 平均梯度
原始图像(基准) 0.73 139.78 106.83
基于低通金字塔 0.78 148.38 120.01
基于小波变换 0.78 147.57 109.73
本文算法 0.80 153.57 126.01

表3

超参数设置"

超参数名称 超参数数值 超参数名称 超参数数值
学习率 0.005 权重衰减 0.000 1
批大小 4 最大训练轮数 50
优化器 AdamW 类别数 4
动量 0.9

表4

模型测试结果"

模型 平均准确度/%
羊绒 羊毛 其它 未对焦
Mask R-CNN 87.2 91.9 64.5 38.5
SOLOv2 91.2 93.5 63.5 38.8
Yoloact 71.0 80.7 52.7 25.7
本文模型 93.1 95.7 65.6 37.5

图10

混淆矩阵"

表5

数据增强策略的消融实验"

数据增强策略 平均准确度/%
随机裁剪 95.29
随机翻转 95.87
随机高反差保留 95.93
随机裁剪+随机翻转 96.34
随机裁剪+随机高反差保留 96.13
随机翻转+随机高反差保留 96.09
随机裁剪+随机翻转+随机高反差保留 96.85

表6

改进SOLOv2的消融实验"

模型结构 平均准确度/%
羊绒 羊毛 二者平均值
ResNet-50+FPN 93.52 94.72 94.12
ResNet-50+PAFPN 94.42 95.20 94.81
Swin Transformer+FPN 95.37 96.42 95.90
Swin Transformer+PAFPN 96.31 97.39 96.85

图11

不同模型测试结果对比"

[1] 张敏, 高维明, 宫平, 等. 毛绒生产现状与未来发展趋势研究[J/OL]. 畜牧兽医科学(电子版), 2019(9): 50-51.
ZHANG Min, GAO Weiming, GONG Ping, et al. Study on the present situation and future development trend of plush production[J/OL]. Graziery Veterinary Scie-nces (Electronic Version), 2019(9): 50-51.
[2] 马志强. 国内外动物纤维显微镜定量分析法的比较[J]. 毛纺科技, 2021, 49(1): 87-90.
MA Zhiqiang. Comparison of animal fiber microscopically quantitative analysis for local and abroad standard[J]. Wool Textile Journal, 2021, 49(1): 87-90.
[3] ZHOU J F, WANG R W, WU X Y, et al. Fiber-content measurement of wool-cashmere blends using near-infrared spectroscopy[J]. Applied Spectroscopy, 2017, 71(10): 2367-2376.
doi: 10.1177/0003702817713480 pmid: 28537417
[4] TANG M F, ZHANG W P, ZHOU H, et al. A real-time PCR method for quantifying mixed cashmere and wool based on hair mitochondrial DNA[J]. Textile Research Journal, 2014, 84(15): 1612-1621.
doi: 10.1177/0040517513494252
[5] 陈恒. 基于羊绒与羊毛纤维数字图像的特征提取与优化研究[D]. 北京: 北京服装学院, 2015: 4-8.
CHEN Heng. Research on feature extraction and optimization based on digital image of cashmere and wool fiber[D]. Beijing: Beijing Institute of Clothing Technology, 2015: 4-8.
[6] 柴新玉. 基于SEM图像的羊绒羊毛纤维鉴别[D]. 上海: 东华大学, 2018: 1-4.
CHAI Xinyu. Identification of cashmere and wool based on SEM images[D]. Shanghai: Donghua University, 2018: 1-4.
[7] 孔繁圣. 基于深度学习的羊绒羊毛纤维识别研究[D]. 杭州: 中国计量大学, 2021: 59-66.
KONG Fansheng. Research on recognition of cashmere and wool fibers based on deep learning[D]. Hangzhou: China University of Metrology, 2021: 59-66.
[8] 常庆蕊. 基于深度学习的织物纤维识别方法研究[D]. 北京: 华北电力大学, 2022: 1-3.
CHANG Qingrui. Research on fabric fiber identification method based on deep learning[D]. Beijing: North China Electric Power University, 2022: 1-3.
[9] HUO Z T, LI Z Y, QU R D, et al. Fiber recognition algorithm based on improved mask RCNN[C]// Proceedings of the 2023 5th International Conference on Pattern Recognition and Intelligent Systems. New York: ACM, 2023: 98-103.
[10] 路凯, 罗俊丽, 张洋, 等. 基于轻量级卷积神经网络的羊绒羊毛识别方法[J]. 毛纺科技, 2024, 52(4): 94-102.
LU Kai, LUO Junli, ZHANG Yang, et al. Cashmere and wool identification method based on lightweight convolutional neural network[J]. Wool Textile Journal, 2024, 52(4): 94-102.
[11] 袁春兰, 熊宗龙, 周雪花, 等. 基于Sobel算子的图像边缘检测研究[J]. 激光与红外, 2009, 39(1): 85-87.
YUAN Chun-lan, XIONG Zong-long, ZHOU Xue-hua, et al. Study of infrared image edge detection based on sobei operator[J]. Laser & Infrared, 2009, 39(1): 85-87.
[12] WANG X L, ZHANG R F, KONG T, et al. SOLOv2: dynamic and fast instance segmentation[J]. ArXiv: Computer Vision and Pattern Recognition. 2020, 33: 17721-17732.
[13] HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition[C]// 2016 IEEE Conference on Computer Vision and Pattern Recogni-tion (CVPR). New York: IEEE, 2016: 770-778.
[14] LIU Z, LIN Y T, CAO Y, et al. Swin transformer:hierarchical vision transformer using shifted windows[C]// 2021 IEEE/CVF International Conference on Computer Vision (ICCV). New York: IEEE, 2022: 9992-10002.
[15] WANG K X, LIEW J H, ZOU Y T, et al. PANet:few-shot image semantic segmentation with prototype alignment[C]// 2019 IEEE/CVF International Conference on Computer Vision (ICCV). New York: IEEE, 2019: 9196-9205.
[16] TOET A. Image fusion by a ratio of low-pass pyra-mid[J]. Pattern Recognition Letters, 1989, 9(4): 245-253.
doi: 10.1016/0167-8655(89)90003-2
[17] DE I, CHANDA B. A simple and efficient algorithm for multifocus image fusion using morphological wave-lets[J]. Signal Processing, 2006, 86(5): 924-936.
doi: 10.1016/j.sigpro.2005.06.015
[18] LOSHCHILOV I, HUTTER F. Decoupled weight decay regularization[EB/OL]. (2017-11-14)[2025-05-12]. https://arxiv.org/abs/1711.05101.
[1] 顾家玉, 张炜栋, 董永春, 孙璇, 徐良军. 银杏叶黄酮对羊毛和蚕丝织物的抗菌整理[J]. 纺织学报, 2026, 47(1): 142-150.
[2] 陈铭, 张豪, 张子缘, 杨清标, 高吉, 范存伟, 孙戒. 含生物基组分的酸性染料的合成及其染色性能[J]. 纺织学报, 2025, 46(12): 142-151.
[3] 徐丽丽, 腾燕飞, 马丕波, 万爱兰. 户外仿生结构功能面料的开发及其性能[J]. 纺织学报, 2025, 46(11): 94-101.
[4] 王司宇, 王峰, 王鸿博, 苏静. L-半胱氨酸/菠萝蛋白酶协同一浴法羊毛织物防毡缩整理[J]. 纺织学报, 2025, 46(10): 152-158.
[5] 朱耀麟, 李政, 张强, 陈鑫, 陈锦妮, 张洪松. 基于近红外光谱和多特征网络的羊毛和羊绒定量检测[J]. 纺织学报, 2025, 46(09): 104-111.
[6] 韩智慧, 万爱兰, 洪亮, 高丽忠, 夏风林. 羊毛纱经编整经损伤及其有限元模拟[J]. 纺织学报, 2025, 46(07): 103-110.
[7] 朱梦慧, 葛美彤, 董智佳, 丛洪莲, 马丕波. 纬编双面羊毛/涤纶交织物的结构与热湿性能评价[J]. 纺织学报, 2025, 46(05): 179-185.
[8] 朱大全, 崔志华, 高普, 朱杰, 张斌, 朱跃文, 陈维国. 丝光羊毛的芳伯胺化修饰及其室温重氮偶合染色[J]. 纺织学报, 2025, 46(05): 186-194.
[9] 朱文硕, 薛元, 孙显强, 薛惊理, 金光. 基于七基色纤维的羊毛混色纱全色域配色[J]. 纺织学报, 2025, 46(04): 71-80.
[10] 李欢, 孟文俊, 张京, 姜哲, 卫艺敏, 周曼, 王强. 低共熔溶剂体系中的羊毛靛蓝染料染色[J]. 纺织学报, 2025, 46(03): 123-130.
[11] 郭庆, 毛阳顺, 任亚杰, 刘济民, 王怀芳, 朱平. 基于漆酶一步催化法的羊毛织物原位染色及阻燃功能化[J]. 纺织学报, 2025, 46(02): 161-169.
[12] 史晶晶, 杨恩龙. 喂入提前量对棉/羊毛段彩纱结构及性能的影响[J]. 纺织学报, 2024, 45(12): 67-73.
[13] 王乐, 段志欣, 姚金波, 刘建勇, 卢建军. 基于底物激活的蛋白酶法羊毛地毯生态丝光处理[J]. 纺织学报, 2024, 45(09): 129-136.
[14] 吴涛, 李婕, 鲍劲松, 王新厚, 崔鹏. 羊毛混纺面料生产流程的碳图谱建模与应用[J]. 纺织学报, 2024, 45(09): 97-105.
[15] 董亚琳, 王黎明, 覃小红. 废弃羊毛角蛋白再生工艺及其高值化应用的研究进展[J]. 纺织学报, 2024, 45(07): 213-222.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!