In the realm of UAV aerial imagery target recognition, detecting small objects presents substantial challenges due to their diminutive size, occlusions among targets, scarcity of distinctive features, and the complexity of backgrounds. To address these issues, this study introduces YOLOv7-PBLight, an innovative, high-precision, and efficient model designed to enhance the accuracy of small object detection in UAV imagery while balancing operational efficiency. Building on the YOLOv7 algorithm, our approach incorporates several key improvements to effectively tackle these challenges: By analyzing the roles of different detection heads, the model eliminates the second subsampling layer and the deepest detection head, thus reducing its receptive field to preserve fine-grained feature information critical for accurate detection of small objects. Furthermore, a Dual-Level Routing Attention (BRA) mechanism is integrated to augment the network's focus on small targets, thereby improving overall algorithm performance. A novel loss function that combines Normalized Gaussian Wasserstein Distance (NWD) with CIOU is introduced to diminish the sensitivity of small objects to positional inaccuracies. Finally, the YOLOv7 backbone is refined using the lightweight network ShuffleNetv2, reducing the model's parameter size and computational burden. Additionally, the utilization of deep separable convolution technology enhances the ELAN and MPConv modules, culminating in the development of YOLOv7-PBiKlight, a lightweight network that achieves a balance between precision and speed. Empirical validation demonstrates that the proposed method effectively resolves the challenges of aerial target detection, significantly improving detection precision with a 4.6% increase in mAP_0.5on the VisDrone2021, reducing the model's parameter size by 67%, and achieving competitive accuracy and speed compared to other algorithms in the field.