A cigarette appearance defect detection method based on improved YOLOv11 and FP16 inference
Abstract
To address the challenges of small defect scales, diverse categories, blurred boundaries, and limited deployment resources in cigarette appearance inspection, this study proposes a defect-characteristic-guided lightweight YOLOv11n optimization and FP16 inference method. Rather than simply stacking existing modules, the proposed framework evaluates three task-related factors: feature representation, bounding-box regression, and inference precision, and selects the final model according to accuracy, model complexity, category-level defect behavior, and deployment cost. Outlook Attention is investigated for local texture aggregation within small windows, WIoU and EIoU are compared for the localization of tiny and elongated defects, and an FP16 inference pipeline is constructed for GPU-based edge-workstation deployment. Experimental results on a real cigarette appearance defect dataset show that the EIoU-YOLOv11n scheme achieves the highest mAP@0.5 of 0.916 without increasing parameters or GFLOPs. FP16 inference further reduces the average processing time from 4.00 ms to 3.02 ms and decreases peak memory consumption by approximately 40.1%. The results indicate that EIoU-YOLOv11n with FP16 inference provides an effective accuracy-efficiency trade-off for edge-oriented cigarette appearance inspection.