Object detection for unmanned aerial vehicles (UAV) aerial photography presents challenges such as tiny and densely distributed objects, and unbalanced categories. Furthermore, the hardware limitations of UAV restrict the scalability of models, leading to reduced accuracy. In response to these challenges, an enhanced YOLOv8m model which incorporates multiple lightweight strategies is proposed. Specifically, GDC (Ghost Dynamic Conv) is introduced into the backbone network to improve feature extraction, and more features are generated with fewer parameters to achieve efficient feature extraction. Additionally, the feature fusion mechanism has been optimized, and the LS-FPN-PAN feature fusion mechanism has been devised to globally reduce the number of feature channels and amount of calculation. Through adaptive feature selection, the channel weight was given to achieve better fusion. Furthermore, a lightweight selective detection head was proposed, and shared convolution was employed to facilitate the learning of target features by three detection heads. The WMPDIoU loss function was designed to reduce the penalty caused by the geometric factors of the detection box of tiny objects. The cost-free approach of substituting NMS function and implementing knowledge distillation is employed to enhance the model's performance. The experimental results show that the model size and parameter number of the improved model are only 42.1% and 55.1% of the original model, but the performance is considerably improved. On the Visdrone2019 test dataset, P, mAP@0.5, mAP@0.5:0.95 are increased by 12.9%, 26.5% and 38.8% respectively, indicating a successful realization of lightweight design with enhanced performance capabilities suitable for effective application in object detection tasks on UAV platforms.