Testing·Technology
Wu Weiwei, Ding Shiyong, Ni Jianjun
2026, 604(1): 100-104.
Aiming at the core bottlenecks of low accuracy, low efficiency and weak consistency in traditional cotton color grade detection (strong subjectivity of manual sensory inspection and poor adaptability of HVI instrument detection), this study integrates computer vision and deep learning technologies to construct an end-to-end intelligent inspection system covering "data collection - model training - performance verification - online application". In the research, a standardized acquisition scheme was built using a 48-megapixel industrial camera and a standard light source, and combined with grid-guided acquisition and visual annotation functions, a fine-grained cotton sample library (CottonDataSet) containing thousands of high-resolution images was established. An improved Swin-RTMDet architecture was innovatively proposed: with Swin-Base Transformer as the backbone network (18 modules stacked in stage 3, downsampling rate of 16x), a cross-stage feature enhancement module (CSFE) and channel attention mechanism were introduced to strengthen the extraction of fine-grained features, and an optimized RTMDet detection head was matched to improve positioning efficiency. Strategies such as two-stage data augmentation (early-stage strong augmentation with Mosaic/MixUp, late-stage fine-tuning), DynamicSoftLabelAssigner dynamic label assignment, and QFL+DIoU Loss joint loss function were adopted to optimize the model. Finally, the integrated intelligent inspection system, on a hardware platform equipped with NVIDIA GeForce RTX 2080, achieved a measured comprehensive accuracy of 98.48% and a single-image processing time as low as 0.419 seconds, supporting the recognition of 10 cotton grades. It effectively meets the requirements of industrial real-time online detection and provides technical support for the intelligent upgrading of cotton industry quality grading.