. In recent years, with the rapid development of drone technology and object detection algorithms, drone-based object detection has found widespread applications across multiple domains. However, current algorithms often face challenges such as missed detections and false positives when processing low-resolution images and small objects. To address these challenges, this paper introduces TE-YOLOv5s, a target detection algorithm based on YOLOv5s specifically designed for UAV (Unmanned Aerial Vehicle) aerial images. Firstly, a four-scale feature fusion structure is proposed based on the original model framework of YOLOv5s in this paper. Additionally, a detection layer for diminutive targets is incorporated in order to enhance the model's capacity to identify diminutive targets effectively. Secondly, the backbone architecture of the YOLOv5s model is reconfigured, and the Transformer encoder is integrated into the C3 module to augment the model's feature extraction capability for various local information. Finally, the loss function of the model is enhanced, and the Focal-EIOU Loss function is employed to enhance both the convergence speed and the accuracy of the regression results. Through training, validating, and testing on a custom dataset, the enhanced detection model outperforms the original model in detecting diminutive targets within complex images, achieving improvements of 6.1% and 7.2% in Precision and mAP@0.5, respectively. The model exhibits superior performance in detecting diminutive targets within complex images, making it more suitable for UAV deployment and application.