A Feature-Enhanced Small Object Detection Algorithm Based on Attention Mechanism

Sensors (Basel). 2025 Jan 20;25(2):589. doi: 10.3390/s25020589.

Abstract

With the rapid development of AI algorithms and computational power, object recognition based on deep learning frameworks has become a major research direction in computer vision. UAVs equipped with object detection systems are increasingly used in fields like smart transportation, disaster warning, and emergency rescue. However, due to factors such as the environment, lighting, altitude, and angle, UAV images face challenges like small object sizes, high object density, and significant background interference, making object detection tasks difficult. To address these issues, we use YOLOv8s as the basic framework and introduce a multi-level feature fusion algorithm. Additionally, we design an attention mechanism that links distant pixels to improve small object feature extraction. To address missed detections and inaccurate localization, we replace the detection head with a dynamic head, allowing the model to route objects to the appropriate head for final output. We also introduce Slideloss to improve the model's learning of difficult samples and ShapeIoU to better account for the shape and scale of bounding boxes. Experiments on datasets like VisDrone2019 show that our method improves accuracy by nearly 10% and recall by about 11% compared to the baseline. Additionally, on the AI-TODv1.5 dataset, our method improves the mAP50 from 38.8 to 45.2.

Keywords: attention mechanism; detection head; feature pyramid network; loss function; small object detection.