Abstract:To address the issues of blurred small-target features, strong complex background interference, inaccurate long-distance target localization, and insufficient generalization of traditional loss functions in complex road scenes, a road traffic object detection algorithm named PM-DETR (Pyramid and Multi-cognitive Detection Transformer) is proposed based on the RT-DETR-R18 framework. First, a partial attention feature extraction module is constructed in the backbone network, where three sub-modules of PATConv (Partial Attention Convolution)—namely PAT_ch, PAT_sf, and PAT_sp are respectively adopted to optimize fine-grained feature extraction in low-level layers and global correlation modeling in high-level layers. Then, the original AIFI module in the neck network is replaced with the proposed AIFI\_MSM (Attention-based Intra-scale Feature Interaction with Multi-scale Attention and Multi-cognitive Adapter) module, which is combined with a CA (Coordinate Attention) module to enhance model robustness against complex weather and illumination variations, expand the receptive field, and alleviate missed detections caused by scale mismatch. Finally, the GIoU loss is replaced by Inner-Shape-IoU (Inner-Shape Intersection over Union) to improve the localization accuracy of non-rectangular objects and small targets. The PM-DETR model is evaluated on the BDD100K (Berkeley DeepDrive 100K dataset) dataset, where an experimental dataset covering overexposure, rain, fog, snow, and other complex scenarios is constructed. The proposed model achieves a precision (P) of 77.547%, a recall (R) of 61.694%, an mAP50 of 70.706%, and an mAP50-95 of 37.809%, which are improvements of 3.913%, 1.89%, 4.051%, and 2.312% over the baseline RT-DETR-R18 model, respectively. Furthermore, the strong generalization capability of the model is further validated on the ACDC and RTTS datasets.