纺织学报 ›› 2026, Vol. 47 ›› Issue (05): 91-98.doi: 10.13475/j.fzxb.20250703801

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

基于改进U-Net和全局优化算法的羊绒纤维长度测量

童俊毅, 杨瑞华()   

  1. 江南大学 纺织科学与工程学院, 江苏 无锡 214122
  • 收稿日期:2025-07-14 修回日期:2026-03-15 出版日期:2026-05-15 发布日期:2026-07-10
  • 通讯作者: 杨瑞华(1981—),女,教授,博士。主要研究方向为新型纺纱方法。E-mail:yangrh@jiangnan.edu.cn
  • 作者简介:童俊毅(2002—),男,硕士生。主要研究方向为纤维测长新技术。
  • 基金资助:
    国家自然科学基金面上项目(52273034)

Cashmere fiber length measurement based on improved U-Net and global optimization algorithm

TONG Junyi, YANG Ruihua()   

  1. College of Textile Science and Engineering, Jiangnan University, Wuxi, Jiangsu 214122, China
  • Received:2025-07-14 Revised:2026-03-15 Published:2026-05-15 Online:2026-07-10

摘要:

针对传统手排法测量羊绒纤维长度存在效率低、主观性强等问题,提出了一种基于改进U-Net和全局优化算法的自动测量方法。该方法设计了包含方向性卷积、空间注意力、非局部特征模块和形态学操作层的改进U-Net架构,用于修复阈值分割过程中产生的纤维断裂;其次构建了基于EfficientNet-B0编码器的UNet++模型,通过混合损失函数解决交叉区域检测中的类别不平衡问题;提出了两阶段全局优化路径追踪算法,通过方向相似度计算、历史经验评分和必要性系数分析,实现复杂交叉场景下的单根纤维准确追踪;最后采用基于模拟退火的匹配优化算法获得完整的纤维长度分布。结果表明:改进U-Net的纤维断裂修复召回率达到98.67%,准确率和召回率的调和平均数(F1)为91.29%;交叉检测模型的交并比(IoU值)为71.74%,召回率为85.42%;测量结果与手排法相比,平均绝对误差为0.67 mm,平均相对误差为1.78%,5组测试样品中有3组的相对误差低于2%。

关键词: 羊绒, 纤维测长, 深度学习, 图像处理, 跟踪算法

Abstract:

Objective Conventional manual stapling methods for measuring cashmere fiber length suffer from low efficiency and subjectivity, requiring 30-40 min for each sample. Existing automated instruments, including Almeter capacitors and optical fiber diameter analyzers (OFDA), have limitations such as incomplete short fiber clamping and restriction to specific sample forms. With computer vision-based methods on the other hand, the threshold segmentation frequently causes fiber breaks, and tracking individual fibers in complex intersecting networks is extremely difficult. This study develops an automated measurement method based on an improved U-Net and global optimization algorithms to overcome these limitations.

Method An improved U-Net (encoder-decoder convolutional network) architecture incorporating directional convolution, spatial attention, nonlocal feature modules, and morphological processing layers was constructed to repair fiber breaks caused by threshold segmentation. A UNet++ (nested U-Net) model with an EfficientNet-B0 encoder and a hybrid Dice-focal loss function was built for crossover region detection. A two-stage globally optimized path tracking algorithm using directional similarity, historical experience scores, and necessity coefficients, combined with a simulated annealing-based matching algorithm, was adopted to obtain the complete fiber length distribution.

Results The improved U-Net achieved a recall of 98.67% and an F1 value of 91.29% in fiber break repair. Precision was reduced due to morphological dilation operations required to ensure full fiber connectivity, as these operations cause slight over-prediction at the pixel level. However, this trade-off ensures that fiber breaks are fully repaired, reducing tracking failures in subsequent steps. The crossover detection model based on UNet++ achieved an intersection over union (IoU value) of 71.74% and a recall of 85.42% on the test set, effectively identifying overlapping regions where pixel loss occurs.

Measurements were conducted on cashmere samples from five batches provided by an enterprise in Inner Mongolia and compared with manual stapling results. The absolute error ranged from 0.23 to 1.07 mm across all sample groups, with an average absolute error of 0.67 mm and an average relative error of 1.78%. Three of the five sample groups had relative errors below 2%, and the remaining two were within 3%. One sample group showed a larger deviation, attributable to an insufficient number of medium-length fibers in the sample, which limited the convergence of the simulated annealing-based matching process.

The two-stage path tracking algorithm was validated in complex crossover scenarios. In a case involving 12 crossovers, the algorithm correctly identified the exit direction by incorporating historical decision weighting, even when directional similarity scores of competing directions differed by only 0.17. In a high-complexity case involving 30 crossovers, where the most challenging decision point had 6 candidate exit directions, the algorithm selected the direction consistent with the actual fiber extension by combining directional similarity, historical experience scores, and global optimization weighting.

The overall fiber length range and distribution pattern were consistent with those of the manual stapling method. The frequency of fibers below 10 mm was generally higher than in the manual method, consistent with the known limitation that short fibers in manual stapling are densely packed and difficult to separate accurately.

Conclusion An automated cashmere fiber length measurement system integrating deep learning and intelligent optimization algorithms was developed. The improved U-Net architecture incorporating directional convolution, spatial attention, and nonlocal feature modules achieved a F1 value of 91.29% and an IoU value of 91.29% of 80.70% in fiber break repair. The two-stage globally optimized path tracking algorithm enabled accurate single-fiber tracking in complex crossover networks by incorporating directional continuity, historical decision experience, and global coordination among competing fiber paths. The simulated annealing-based matching algorithm obtained the complete fiber length distribution. Evaluated on five batches of cashmere samples, the system showed good agreement with the manual stapling method, with an average absolute error of 0.67 mm and an average relative error of 1.78%. The method addresses the technical challenges of threshold-induced fiber breakage and individual fiber tracking in complex networks, and may be extended to other natural fiber types in future work.

Key words: cashmere, fiber length measurement, deep learning, image processing, tracking algorithm

中图分类号: 

  • TS131.8

图1

整体处理流程"

图2

样品制作流程"

表1

纤维断裂修复模型性能对比"

模型
架构
验证集
IoU/%
准确
率/%
召回
率/%
验证集
F1/%
每轮
耗时/s
A 91.63 95.91 95.57 95.74 17.43
B 91.18 95.81 95.46 95.63 20.11
C 80.70 84.93 98.67 91.29 23.35

图3

3种模型纤维断裂修复效果对比"

图4

交叉检测模型训练动态评估"

表2

纤维长度测量实验结果"

样本
名称
完整纤维像素/个 交叉纤维像素/个 比例/% 根数 本组纤维
长度/mm
平均纤维
长度/mm
手排纤维
长度/mm
相对误差/
%
58 508 36 521 9 409 5 625 13.035 79 35.854 34.54 35.15 1.74
a 47 370 58 595 6 650 9 162 13.070 96 32.521
47 603 53 193 5 196 6 883 13.043 72 40.345
64 997 64 258 10 591 9 782 13.059 91 41.970 39.10 38.03 2.81
b 58 797 47 972 8 105 3 976 13.094 83 36.673
62 557 67 638 10 381 11 095 13.052 89 43.768
52 388 49 873 7 086 6 778 13.023 72 41.570 39.67 39.11 1.43
c 61 301 42 521 8 992 6 280 13.099 63 48.489
32 205 35 843 3 725 2 132 13.041 56 34.036
42 352 34 488 2 695 2 118 13.045 49 42.580 36.10 36.33 0.63
d 55 167 51 957 7 622 7 888 13.082 90 34.913
31 831 43 544 3 377 6 344 13.060 61 35.899
61 014 65 085 11 340 11 509 13.240 104 36.057 36.78 37.64 2.28
e 74 089 77 586 13 115 13 621 13.263 116 38.821
88 272 84 149 16 259 15 890 13.290 127 40.560

图5

单根纤维跟踪示意图"

图6

完整纤维跟踪示意图"

图7

不同组纤维长度曲线"

[1] DRESSLER E A, BORMANN J M, WEABER R L, et al. A review of cashmere fiber phenotypes: production, heritabilities, and genetic correlations[J]. Small Ruminant Research, 2024, 240: 107369.
doi: 10.1016/j.smallrumres.2024.107369
[2] 陈旗, 杨焕焕, 赵霞. 浅析人工智能毛绒分析仪在羊绒羊毛检测中的应用[J]. 中国纤检, 2023(5): 81-84.
CHEN Qi, YANG Huanhuan, ZHAO Xia. Application of artificial intelligence plush analyzer in cashmere wool detection[J]. China Fiber Inspection, 2023(5): 81-84.
[3] 吕晓红, 冯满荣, 姚苗苗. 分梳山羊绒纤维长度的测试[J]. 中国纤检, 2017(2): 81-83.
LÜ Xiaohong, FENG Manrong, YAO Miaomiao. Test of the dehaired cashmere fiber length[J]. China Fiber Inspection, 2017(2): 81-83.
[4] 吴红艳, 王府梅. 须丛曲线理论研究[J]. 东华大学学报(自然科学版), 2013, 39(5): 599-603.
WU Hongyan, WANG Fumei. The theory of the fibrogram[J]. Journal of Donghua University (Natural Science), 2013, 39(5): 599-603.
[5] 金敬业, 王府梅, 徐步高. 基于随机须丛逐步分解模型的纤维长度分布计算方法[J]. 纺织学报, 2017, 38(2): 81-89.
JIN Jingye, WANG Fumei, XU Bugao. Method for calculating fiber length distribution based on hierarchical model of random-beard[J]. Journal of Textile Research, 2017, 38(2): 81-89.
doi: 10.1177/004051756803800110
[6] 金敬业, 杨欢, 吴美琴, 等. 基于双端须丛试样的棉毛纤维长度频率分布测量[J]. 东华大学学报(自然科学版), 2018, 44(2): 196-204, 237.
JIN Jingye, YANG Huan, WU Meiqin, et al. Length-frequency distribution testing of cotton and wool based on dual-beard sample[J]. Journal of Donghua University (Natural Science), 2018, 44(2): 196-204, 237.
[7] 孙佳慧, 马静涛, 苏健, 等. 双须光电法分梳绒测长仪与手排法的测试结果对比[J]. 东华大学学报(自然科学版), 2024, 50(3): 98-106.
SUN Jiahui, MA Jingtao, SU Jian, et al. Comparison of test results between double whisker length measurement method and hand row method[J]. Journal of Donghua University (Natural Science Edition), 2024, 50(3): 98-106.
[8] LUO J L, LU K, CHEN Y G, et al. Automatic identification of Cashmere and wool fibers based on microscopic visual features and residual network model[J]. Micron, 2021, 143: 103023.
doi: 10.1016/j.micron.2021.103023
[9] 杨传颖, 高荣贵, 石宝, 等. 基于图像处理的分梳山羊绒长度检测方法[J]. 毛纺科技, 2020, 48(2): 68-72.
YANG Chuanying, GAO Ronggui, SHI Bao, et al. Test method for carding cashmere length based on image processing[J]. Wool Textile Journal, 2020, 48(2): 68-72.
[10] RONNEBERGER O, FISCHER P, BROX T. U-Net: convolutional networks for biomedical image segmentation[C]//Medical Image Computing and Computer-Assisted Intervention-MICCAI 2015. Cham: Springer, 2015: 234-241.
[11] ZHOU Z W, RAHMAN SIDDIQUEE M M, TAJBAKHSH N, et al. UNet++: a nested U-Net architecture for medical image segmentation[C]// Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support. Cham: Springer, 2018: 3-11.
[12] WANG S Q, YATAGAWA T, SUZUKI H, et al. Image based measurement of individual fiber lengths for randomly oriented short fiber composites[J]. Journal of Nondestructive Evaluation, 2022, 41(2): 45.
doi: 10.1007/s10921-022-00876-z
[13] XING W Y, LIU Y W, XIN B J, et al. The application of deep and transfer learning for identifying cashmere and wool fibers[J]. Journal of Natural Fibers, 2022, 19(1): 88-104.
doi: 10.1080/15440478.2020.1727817
[1] 都晓广, 景军锋, 王永波. 基于改进YOLOv9s的轻量级蕾丝织物表面缺陷检测方法研究[J]. 纺织学报, 2026, 47(04): 145-153.
[2] 冯采伶, 于施佳, 韩曙光. 基于深度学习的服装关键点实时检测模型[J]. 纺织学报, 2026, 47(01): 196-206.
[3] 叶泽南, 李子印, 何健郡, 汪小东, 叶飞, 刘伟红. 基于频域景深合成和改进SOLOv2模型的羊毛羊绒纤维识别算法[J]. 纺织学报, 2026, 47(01): 80-88.
[4] 庹武, 刘琼洋, 李庆响, 陈谦, 范睿鸽, 李佩. 基于机器视觉与YOLO11n的女西裤尺寸自动测量[J]. 纺织学报, 2025, 46(12): 208-215.
[5] 周青青, 常硕, 毛志平, 吴伟. 人工智能在纺织印染行业中的应用研究进展[J]. 纺织学报, 2025, 46(12): 260-269.
[6] 余志才, 余晓娜, 丁笑君, 顾冰菲. 基于PointNet分类模型的织物三维悬垂模型匹配[J]. 纺织学报, 2025, 46(11): 111-117.
[7] 张子悦, 江红霞, 刘基宏. 单色机织物数字纹理色卡的设计与评价[J]. 纺织学报, 2025, 46(10): 167-175.
[8] 朱耀麟, 李政, 张强, 陈鑫, 陈锦妮, 张洪松. 基于近红外光谱和多特征网络的羊毛和羊绒定量检测[J]. 纺织学报, 2025, 46(09): 104-111.
[9] 王青, 姜越夫, 赵恬恬, 赵世航, 刘甲怡. 基于深度学习的纱管位姿估计方法及抓取实验[J]. 纺织学报, 2025, 46(07): 217-226.
[10] 顾孟尚, 张宁, 潘如如, 高卫东. 结合频域卷积模块的机织物图像疵点目标检测[J]. 纺织学报, 2025, 46(05): 159-168.
[11] 李吉国, 景军锋, 程为, 王永波, 刘薇. 基于机器视觉的玻璃纤维纱团外观缺陷检测系统设计[J]. 纺织学报, 2025, 46(05): 243-251.
[12] 白雨薇, 徐健, 朱耀麟, 丁展博, 刘晨雨. 基于改进YOLOv8的梳棉机棉网上棉结检测方法[J]. 纺织学报, 2025, 46(03): 56-63.
[13] 黄小源, 侯珏, 杨阳, 刘正. 基于改进深度学习模型的高精度服装样板自动生成[J]. 纺织学报, 2025, 46(02): 236-243.
[14] 马运娇, 王蕾, 潘如如. 基于双斜交平面镜的纱线条干三维仿真[J]. 纺织学报, 2025, 46(02): 86-91.
[15] 蔡丽玲, 王梅, 邵一兵, 陈炜, 曹华卿, 季晓芬. 基于改进堆叠生成对抗网络的传统汉服智能定制推荐[J]. 纺织学报, 2024, 45(12): 180-188.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!