An Improved YOLOX Model and Domain Transfer Strategy for Nighttime Pedestrian and Vehicle Detection

Aimed at the vehicle/pedestrian visual sensing task under low-light conditions and the problems of small, dense objects and line-of-sight occlusion, a nighttime vehicle/pedestrian detection method was proposed. First, a vehicle/pedestrian detection algorithm was designed based on You Only Look Once X (YOLOX). The model structure was re-parameterized and lightened, and a coordinate-based attention mechanism was introduced into the backbone network to enhance the feature extraction efficiency of vehicle/pedestrian targets. A feature-scale fusion detection branch was added to the feature pyramid, while a loss function was designed, which combines Complete Intersection Over Union (CIoU) for target localization and Varifocal Loss for confidence prediction to improve the feature extraction ability for small, dense, and low-illumination targets. In addition, in order to further improve the detection accuracy of the algorithm under low-light conditions, a training strategy based on data domain transfer was proposed, which fuses the larger-scale daylight dataset with the smaller-scale nighttime dataset after low-illumination degrading. After low-light enhancement, training and testing were performed accordingly. The experimental results show that, compared with the original YOLOX model, the improved algorithm trained by the proposed data domain transfer strategy achieved better performance, and the mean Average Precision (mAP) increased by 5.9% to 82.4%. This research provided effective technical support for autonomous driving safety at night.