This paper proposes an improved algorithm based on YOLOv5, named RepDrone-YOLOv5, to address the problem that the traditional detection algorithm has the problem of false detection and missed detection when detecting small targets due to the small target size, dense distribution and complex background of the UAV aerial imagery. First of all, in order to obtain and transmit a richer and more distinguished small target characteristics, adjust the sampling multiple and add a shallow features of the rich information in the model training process. At the same time, a RepVGG-based RepC3 feature extraction module is designed, by jointing local and global information to break the limitations of ordinary convolution extraction to obtain a greater experience. Further, an improved SPP module instead of the SPPF module to alleviate the effects of the loss of the pool layer on the loss of target information. Finally, an EIoU loss function optimizes the regression process of the prediction box and the detection box, and enhances the positioning ability of small targets. On the VisDrone2019 datasets, RepDroneYOLOv5 improves about 9 percentage points in mAP compared to the original YOLOv5 model, and the number of model parameters is reduced by about 80%.