There are many instances of small and medium-sized targets in drone aerial images, and existing detection algorithms are prone to missed and false detections during the detection process. To address this issue, A small target detection method based on improved YOLOv5 in UAV aerial images are proposed. Firstly, the bilinear interpolation upsampling method is used in the feature fusion section to reduce the loss of feature information during the upsampling process. Then, a small target detection layer of size 160 is added to locate and recognize small targets using shallow feature information, reducing the missed detection rate. Finally, three CBAM attention mechanism modules were added to improve the accuracy of the algorithm. On the VisDrone2019 dataset, the improved algorithm improved mAP by 2.1% compared to Algorithm YOLOv5, effectively completing small object detection tasks.