Real-time Detection Algorithm for Surface Defects Based on Optical Lenses
(College of Science and Technology Ningbo University, Ningbo 315300, China)
Abstract
YOLO series models have become the benchmark in the real-time detection domain due to their balanced efficiency and accuracy, yet their performance is restricted by the inherent flaws of NMS post-processing, including additional computational overhead and the erroneous elimination of valid information. Although end-to-end Transformer frameworks can break free from the reliance on NMS, their excessively high computational cost limits practical application. To address this, the study proposes a dual-dimensional innovative architecture, which constructs a dedicated Transformer network for real-time end-to-end detection and develops a hybrid Mamba-Transformer backbone network named Mamba Vision, significantly enhancing the multi-scale feature representation capability. A phased optimization strategy is adopted, with parallel acceleration achieved by decoupling intra-scale and cross-scale feature processing for speed improvement and an uncertainty-minimization query initialization strategy introduced for accuracy enhancement to boost the accuracy of target localization. On the COCO benchmark, the proposed model achieves a mean Average Precision (mAP) of 53.05% with an inference speed exceeding 100 FPS on a T4 GPU. Compared with mainstream YOLO variants, it improves detection accuracy by 4.2%~6.7%, achieves breakthroughs in both speed and accuracy and thus provides a novel paradigm for industrial real-time detection systems.
Keywords
optical lens; real-time Object Detection; end-to-end
References
- [1] ZENG F G,DONG B,ZHANG Y. MOTR: End-to-end Multiple-object Tracking with Transformer [C]//European Conference on Computer Vision.Heidelberg:Springer,2022:659-675.
- [2] NAWARATNE R,ALAHAKOON D,DE SILVA D. Spatiotemporal Anomaly Detection Using Deep Learning For Real-Time Video Surveillance [J].IEEE Transactions on Industrial Informatics,2019,16(1):393-402.
- [3] BOGDOLL D,NITSCHE M,ZÖLLNER J M. Anomaly Detection in Autonomous Driving: A Survey [C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.New Orleans:IEEE,2022:4488-4499.
- [4] BOCHKOVSKIY A,WANG C Y,LIAO H Y M. YOLOv4: Optimal Speed and Accuracy of Object Detection [J/OL].arXiv:2004.10934 [cs.CV].(2020-04-23).https://arxiv.org/abs/2004.10934.
- [5] GE Z,LIU S,WANG F,et al. YOLOX: Exceeding YOLO Series in 2021 [J/OL].arXiv:2107.08430 [cs.CV].(2021-08-06).https://arxiv.org/abs/2107.08430.
- [6] JOCHER G. YOLOv5 Release v7.0 [EB/OL].(2022-11-22)[2025-07-03].https://github.com/ultralytics/yolov5/tree/v7.0.
- [7] JOCHER G. YOLOv8 [EB/OL].(2024-07-12)[2025-07-05].https://github.com/ultralytics/ultralytics/tree/main.
- [8] HUANG X,WANG X X,LV W Y. PP-YOLOv2: A practical object detector [J/OL].(2021-04-21)[2025-07-16].https://arxiv.org/abs/2104.10419.
- [9] LI C Y,LI L L,GENG Y F,et al. YOLOv6 v3.0: A Full-Scale Reloading [J/OL].arXiv:2301.05586 [cs.CV].(2023-01-13).https://arxiv.org/abs/2301.05586.
- [10] LONG X,DENG K P,WANG G Z,et al. PP-YOLO:An Effective and Efficient Implementation of Object Detector [J/OL].arXiv:2007.12099 [cs.CV].(2020-08-03).https://arxiv.org/abs/2007.12099.
- [11] REDMON J,FARHADI A. YOLOv3: An Incremental Improvement [J/OL].arXiv:1804.02767 [cs.CV].(2018-04-08).https://arxiv.org/abs/1804.02767.
- [12] WANG C Y,BOCHKOVSKIY A,LIAO H Y M. YOLOv7: Trainable bag-of-Freebies Sets New State-of-the-art for Real-time Object Detectors [C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Vancouver:IEEE,2023:7464-7475.
- [13] XU S L,WANG X X,LV W Y. PP-YOLOE: An evolved version of YOLO [J/OL].arXiv:2203.16250 [cs.CV].(2022-12-12).https://arxiv.org/abs/2203.16250.
- [14] ZHU X Z,SU W J,LU L W. Deformable DETR: Deformable Transformers for end-to-end Object Detection [J/OL].arXiv:2010.04159 [cs.CV].(2021-03-18).https://arxiv.org/abs/2010.04159.
- [15] YAO Z Y,AI J B,LI B X. Efficient DETR: Improving End-to-end Object Detector with Dense Prior [J/OL].arXiv:2104.01318 [cs.CV].(2021-04-03).https://arxiv.org/abs/2104.01318.
- [16] ZHANG H,LI F,LIU S L. DINO:DETR with Improved Denoising Anchor Boxes for End-to-End Object Detection [J/OL].arXiv:2203.03605 [cs.CV].(2022-07-11).https://arxiv.org/abs/2203.03605.
- [17] GU A,DAO T. Mamba: Linear-time Sequence Modeling with Selective State Spaces [J/OL].arXiv:2312.00752v2 [cs.LG].(2024-05-31).https://arxiv.org/html/2312.00752v2.
- [18] PEI X H,HUANG T,XU C. EfficientVMamba: Atrous Selective Scan for Lightweight Visual Mamba [J/OL].arXiv:2403.09977 [cs.CV].(2024-03-15).https://arxiv.org/abs/2403.09977.
- [19] ZHU L H,LIAO B C,ZHANG Q. Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model [C]//Proceedings of the 41st International Conference on Machine Learning.Vienna:PMLR,2024:62429-62442.
- [20] REDMON J,DIVVALA S,GIRSHICK R,et al. You Only Look Once: Unified, Real-time Object Detection [C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.Las Vegas:IEEE,2016:779-788.
- [21] CARION N,MASSA F,SYNNAEVE G,et al. End-to-end Object Detection With Transformers [C]//European Conference on Computer Vision. Heidelberg:Springer,2020:213-229.
- [22] ZHU X Z,SU W J,LU L W. Deformable DETR: Deformable Transformers for End-to-end Object Detection [J/OL].arXiv:2010.04159 [cs.CV].(2021-03-18).https://arxiv.org/abs/2010.04159.
- [23] LIU S L,LI F,ZHANG H. DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR [J/OL].arXiv:2201.12329 [cs.CV].(2022-03-30)https://arxiv.org/abs/2201.12329.
- [24] LI F,ZHANG H,LIU S L. DN-DETR: Accelerate DETR Training by Introducing Query Denoising [C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.New Orleans:IEEE,2022:13619-13627.
- [25] CHEN Q,CHEN X K,ZENG G. Group DETR: Fast Training Convergence with Decoupled one-to-many Label Assignment [J/OL].arXiv:2207.13085 [cs.CV].(2023-08-31).https://arxiv.org/abs/2207.13085.
- [26] ZHU L H,LIAO B C,ZHANG Q. Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model [C]//Proceedings of the 41st International Conference on Machine Learning.Vienna:PMLR,2024:62429-62442.
- [27] WANG Y M,ZHANG X Y,YANG T. Anchor DETR: Query Design for Transformer-based Detector [C]//Proceedings of the AAAI Conference on Artificial Intelligence. Vancouver:AAAI,2022:2567-2575.
- [28] MENG D P,CHEN X K,FAN Z J. Conditional DETR for Fast Training Convergence [C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. Montreal:IEEE,2021:3651-3660.
- [29] GAO P,ZHENG M H,WANG X G. Fast Convergence of DETR with Spatially Modulated Co-Attention [C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. Montreal:IEEE,2021:3621-3630.
About the authors
Han Junru (1993-), female, Han ethnicity, from Hulunbuir, Inner Mongolia, teaching assistant, master's student, research direction: image processing and artificial intelligence; Guo Jianfeng (1986-), male, Han nationality, from Jinzhong, Shanxi Province, associate professor, doctoral student, research direction: image processing and artificial intelligence.