Abstract:While deep learning has advanced traffic object detection, accurately detecting small objects in complex traffic scenes with dense occlusion remains challenging. To address these issues, this paper proposes a novel small traffic object detection algorithm, CDAQ-DDETR, which incorporates an attention-based deformation and dynamic querying mechanism. Building upon Deformable DETR, the algorithm introduces the CBAM attention-based dual-tower mechanism and DCNv2 Deformable convolutions to reconstruct the original residual network, thereby enhancing the semantic acquisition capabilities for small traffic objects in dense areas. By leveraging the AFN network concept to add lower-level features and constructing an attention-aware fusion pyramid module, the algorithm improves detection performance for multi-scale small and medium traffic objects. Additionally, by integrating a dynamic query mechanism module before the original decoder, combined with matching input image characteristics, it constructs optimal query vectors, enhancing the algorithm′s adaptability and generalization ability against diverse background interferences. Experiments conducted on the VisDrone2019 dataset show that the CDAQ-DDETR algorithm has achieved a mean Average Precision (mAP@0.5:0.95) of 37.9% and a mean Average Recall (mAR@0.5:0.95) of 57.4%. Compared to the current state-of-the-art (SOTA) algorithms, there is an improvement of 5.5% in detection precision and 8.0% in recall rate, particularly, an increase of 6.9% in precision and 10.0% in recall rate for detecting small objects. Visualization experiments further demonstrate its practical applicability and superior performance in detecting small traffic objects in dense scenes.