Object detection based on computer vision is applied to the location and classification of traffic objects in autonomous driving perception system. To enhance the detecting stability of small scale, block and low texture objects, a new approach is proposed to detect traffic objects using multiscale visual feature fusion, which can be divided into 640 × 640 inputs. It extracts the C3, C4, and C5 level features through a lightweight convolutional backbone, and constructs a cross-scale fusion module that combines top-down, bottom-up, and spatial-channel attention. In the detection phase, a decoupled prediction architecture is used to calculate the target class, the confidence level, and the bounding box regression, so that the gradient interference is reduced. Experiments on BDD100K and KITTI data sets demonstrate that this method is superior to Faster R-CNN, SSD, YOLOv5, YOLOv8 and FPN-YOLO, and shows a more stable detection performance in the case of small traffic objects, as well as at night, in rain, in backlighting, with congestion, and in heavy traffic.