Enhanced YOLOv8 with FPN-Based Spatial Attention for Waste Detection in Complex Scenic Areas

Yuan Sun, Zhuangzhuang Zhu · 2025

Waste detection in scenic areas faces significant challenges due to complex backgrounds, diverse waste types, and variable environmental conditions. This paper proposes a waste detection method based on an improved YOLOv8 algorithm. The key innovation lies in designing a novel Feature Pyramid Network (FPN) branch structure that generates predicted heatmaps for waste targets. These heatmaps are integrated into the YOLOv8 backbone network as spatial attention weights, enhancing the network's spatial focus during forward propagation. This design not only improves detection accuracy in complex backgrounds but also effectively reduces false positives caused by background interference. To validate the algorithm's performance, we constructed a waste dataset featuring complex scenic area backgrounds. The improved algorithm achieves [email protected] and [email protected]:0.95 values of 0.863 and 0.744 respectively, surpassing the original YOLOv8s by 0.6 and 1.3 percentage points. Notably, the detection performance remains stable even in challenging scenarios involving occlusion and varying lighting conditions. Our experimental results demonstrate significant improvements in recall rates across all waste categories while maintaining efficient detection speed. This study provides a practical solution for intelligent waste detection and classification in scenic areas, offering valuable insights for environmental protection and resource recycling applications.

Read the paper · More papers on PaperTik