To solve the problems that small targets are difficult to detect, dense targets and complex environment lead to the increase of missed detection probability in UAV perspective, an improved YOLOv7-tiny UAV target detection algorithm is proposed. Firstly, a parallel network is added on the basis of the backbone network to enhance the capability of extracting feature map information. Secondly, the sampling scale of small targets is increased and the FPN structure is improved, so that the feature map output of the backbone network can be used for subsequent up-sampling and down-sampling, and the network accuracy is improved. Then, coordinate attention (CA) is added to optimize the output feature map of backbone network and reduce the loss of feature information. Finally, WIoU loss function is used to calculate location loss, which enhances the detection ability of small targets. Experimental results show that compared with the original algorithm, improved YOLOv7-tiny algorithm accuracy and recall rate increased by 2.8 and 2.7 percentage points respectively, mAP@0.5 and mAP@0.5:0.95 increased by 3.8 and 3.2 percentage points respectively, effectively improve the detection accuracy of the algorithm. © 2024 Editorial Department of Scientia Agricultura Sinica. All rights reserved.