An improved algorithm was proposed.By means of the advantages of feature extraction in deep learning,combined with an improved convolutional block attention module,and with the YOLOv5 model backbone network replaced with an improved MobileNetv2 lightweight network,the I-YOLOv5 algo-rithm was formed to improve the accuracy,small target and multi-target detection capabilities while real-time performance was maintained.In order to build the data set,the Label Img tool was used to complete the annotation work by means of network search and independent recording of unmanned aerial vehicle video.Experiments showed that the improved I-YOLOv5 algorithm had a significantly better ability in detection accuracy compared with the original YOLOv5,and the effect of small target and multi-target detection was also better.The optimized algorithm performed well in video detection and had a better re-al-time performance.Through the optimization of the model structure,the size of the detection model was less than 18.6%of the original,and the detection speed increased by 120%.The average accura-cy mean of the improved I-YOLOv5 algorithm reached 97.8%.