In unmanned aerial vehicle (UAV) aerial small object detection tasks, the difficulties arising from small target sizes, densely packed arrangements, and intricate backgrounds contribute to reduced detection accuracy, frequent missed detections, and elevated false-positive rates. To address these issues, this paper optimizes YOLOv8 and proposes an improved UAV aerial image object detection model, ODD-YOLOv8. The C2f_ODConv module is designed and introduced into the Backbone along with ODConv. By employing multi-dimensional attention mechanisms, it enhances feature extraction capabilities while reducing parameter redundancy. Dysample is utilized for upsampling operations, dynamically adjusting sampling positions based on the content of input features to optimize sampling points, thereby ensuring efficiency and better preservation of feature information. The model structure is optimized by removing the large object detection layer and adding an extra small object detection layer, effectively retaining feature information and enhancing detection performance. The DynamicHead detection head is employed, integrating attention mechanisms to dynamically focus on small target areas, effectively detecting small objects. Experimental results on the VisDrone2019 dataset show significant improvements over the baseline model, with increases of 10.7%, 11.5%, 13%, and 8.6% in precision, recall, mAP50, and mAP50-95, respectively. Compared to some recent outstanding models, ODD-YOLOv8 also demonstrates clear advantages, proving the effectiveness of the proposed model.