Abstract:In the process of UAV aerial photography, the background is broader and the targets are smaller in size. In this paper, we propose a lightweight target detection algorithm YOLOX-IM for UAV aerial photography based on YOLOX-S. First, to improve the performance of small target decection, the training set is preprocessed and data is enhanced by using a Slicing Aided Hyper Inference (SAHI) algorithm as well as a coordinate correction matrix. Then, a shallow feature map as well as an ultra-lightweight subspace attention module are introduced in the Path Aggregation Network (PAN), and a detection head is added for small object detection. Finally, the loss function of the boundary regression is optimized. The experimental results on the VisDrone2019 dataset show that the proposed model has 8% higher detection accuracy compared with the YOLOX-S; compared with the original model, the model volume is significantly reduced to 4.55MB. Next, the model is used to conduct traffic parameter extraction for field traffic monitoring in Tianjin, Lushui road, China. The study indicates that the model has the highest traffic extraction parameter accuracy of 96.14% at the UAV altitude of 50 meters.