Aiming at the problems of large amount of parameters and limited hardware platform of deep learning for UAV tar-get detection,an infrared target detection algorithm based on YOLOv5 network is proposed.Firstly,aiming at the small shooting tar-get of UAV,the three-scale feature detection is modified to two-scale feature detection to simplify the model structure.The dense-block module,ECA attention module and CIoU are used to improve the detection accuracy of the model.The experimental results show that compared with the YOLOv5s algorithm,the improved algorithm reduces the number of model parameters by 25.2%and on-ly 5.3M on the premise of ensuring the accuracy.This algorithm has reference value for the application of UAV in the field of public safety.