Optimisation of the lightweight RT-DETR model for visual detection of micro defects in welds
Abstract
This study addresses the challenges of inefficient multi-scale feature fusion and high computational complexity in detecting micro defects on welding surfaces, which can compromise detection accuracy and real-time performance. An object detection framework is proposed that integrates a lightweight architecture with adaptive feature enhancement. The method utilises a ShuffleNet V2-based backbone network, optimised via channel shuffle operations and grouped convolution mechanisms. This design reduces model parameters by 33% and floating-point operations (FLOPs) by 9%, while maintaining multi-stage feature representation capabilities, making it suitable for deployment on edge computing devices. To handle scale variance in industrial defect detection, the neck structure is reconstructed using a bidirectional feature pyramid network (Bi-FPN), which improves cross-scale feature interaction through bidirectional information flow and learnable weight allocation. Additionally, an adaptive spatial feature fusion (ASFF) module is incorporated into the detection head, dynamically optimising spatial weight distributions across hierarchical features to enhance semantic consistency and scale invariance. Experimental evaluations on an industrial welding dataset (12,000 images across six micro-defect categories) show significant improvements. The optimised model achieves 80.40 frames per second (FPS) inference speed on the NVIDIA Jetson Orin Nano hardware and a 2.66% increase in mAP@0.5:0.95 compared to the baseline real-time detection transformer (RT-DETR). With a compact model size of 23.5 MB, the proposed approach shows a 5.7% improvement in micro-defect recall rate. These advancements provide an effective solution for online welding quality inspection in resource-constrained environments, improving detection accuracy, computational efficiency and real-time performance.