Abstract
Textile fiber diameter is a practical indicator of fiber fineness and a key basis for microscopic fiber identification, quality grading, material labeling and import-export inspection. In optical microscopy, a few pixels of boundary displacement can become micrometer-scale diameter error; at 0.4167 μm/pixel, five pixels correspond to 2.08 μm . This study presents an improved YOLOv8 Seg based method for subpixel textile fiber diameter measurement via skeleton projection. Coordinate attention is inserted into a shallow YOLOv8 Seg backbone layer to retain spatial cues for high-aspect-ratio fibers. The predicted instance mask is then used as a localization prior for gradient-weighted boundary refinement, with an area-ratio fallback for weak transparent edges. A Zhang-Suen skeleton constructs local normals, so fiber diameter is measured across the local axis rather than from a curvature-sensitive envelope. The method was evaluated on 1100 microscopic images covering ten natural and chemical fiber types with diameters of 10-60 μm . The improved YOLOv8 Seg model achieved a mask mAP50:95 of 0.771, a 5.72 percentage-point gain over YOLOv8 Seg, while retaining 3.26 million parameters, 11.4 GFLOPs and 75.2 Frames/s. Boundary evaluation reduced the halo area ratio to 1.86% and the mean boundary error to 3.91 pixels. Skeleton projection reached a 1.87-pixel mean absolute error and R2 = 0.993 against manual microscopy. On an NVIDIA GT1030 device, 200 samples were processed 7.93 times faster than manual inspection.