Aerial target detection is an important direction in target detection. Due to the limitations of UAV’s volume and computing power, it is necessary to balance the time complexity and accuracy of the algorithm. This paper selects YOLOv5s as the benchmark method of the article. By introducing the feature extraction structure of shufflenetv2, the backbone of YOLOv5s is improved to reduce the amount of calculation of the network, and then the attention mechanism CBMA module is added to the network. Finally, the detection comparison experiment is carried out on visdrone data set. Experimental results show that flops is reduced from 15.7G to 3.7G. After accelerated by tensorRT framework, the improved algorithm can run 53fps on Jetson nano, which can meet the needs of real-time UAV aerial target detection.