Abstract:Aiming at the phenomena of leakage, false detection and low detection accuracy in complex scenes such as dense targets, small targets in distant view, etc., which occur in the helmet detection algorithm for two-wheeled vehicles, an improved RT-DETR helmet detection algorithm for two-wheeled vehicles is proposed on the basis of RT-DETR-r18. A dual cross-stage multi-scale feature fusion module (DcspBlock) is designed, and a multi-core initialization module (PKIBlock) is incorporated into the cross-stage module, which reduces the number of model parameters while effectively enhancing the network’s ability to capture targets of different scales in the near and far scenes; a small target detection module Decoderhead-p2 is introduced, which effectively enhances the model’s ability to detect small target detection accuracy; in order to alleviate the positive and negative sample imbalance and the inaccurate positioning of the bounding box in complex detection scenarios, the original model’s GIOU is replaced by the improved loss function MPD_Focaler-IOU, and the computation of the IOU is improved by setting the threshold parameter, so as to minimize the impact of the positive and negative sample imbalance on the model’s performance, and the computation of the minimum vertical distance is introduced to enable the bounding box to be finely localized. which makes the bounding box have better performance in fine localization. The experiments show that on the TSHW dataset, the improved RT-DETR improves the mAP@0.5 by 3.6% and reduces the number of parameters by 17.6% compared with the original model, while keeping a smaller computational volume, indicating that the improved model can effectively enhance the performance of two-wheeled vehicle helmet detection in complex scenes.