# An Improved YOLOX Model and Domain Transfer Strategy for Nighttime Pedestrian and Vehicle Detection
###### Abstract  
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. vehicle and pedestrian detection; YOLOX; attention mechanism; data domain transfer; night object detection +
Footnote †: journal: Medical Imaging and Vision  
can be challenging because of short exposure times, images lacking the necessary features for target detection, and direct image light enhancement potentially generating noise that interferes with vision tasks. The second is the detection of small vehicle/pedestrian targets and multi-scale variations of vehicle/pedestrian targets. The vehicle/pedestrian features extracted by the detector will be more susceptible to noise interference in the environmental background when there are vehicles and pedestrians of different sizes in the scene at the same time, or when there are individuals with a small size and low clarification in the vehicle/pedestrian object. This will cause missed detection and false detection and present significant challenges regarding the accuracy of the detection results. Traditional vehicle/pedestrian detection algorithms recognize targets using manually created feature extraction methods [5; 6], but in natural application environments, target features are complex and varied, which makes it difficult to successfully abstract and generalize the manually generated features. The current common approach for detecting vehicles and pedestrians uses deep-learning-based target detection algorithms, which can learn from data to produce feature representations with improved detection accuracy and resilience. One-stage detection techniques and two-stage detection methods are the two categories that deep learning-based object detection algorithms fall under. In order to achieve a trade-off between speed and accuracy, one-stage detection techniques such as the You Only Look Once (YOLO) family of algorithms [7; 8] and the Single-Shot multibox Detector (SSD) [9] can directly classify and regress the target. The detection accuracy of two-stage detection techniques, such as the Faster Region with Convolutional Neural Networks (R-CNN) [10], Cascade R-CNN [11], etc., is often greater than that of one-stage detectors, but the detection speed will be significantly slower and they cannot be detected online in real time. The authors of [12] improved the feature pyramid and the feature learning capabilities of the YOLOv3 model for use in actual applications. They also included an attention mechanism and optimized the loss function to further increase the accuracy of vehicle/pedestrian identification.