Enhancing Pest Management in Precision Agriculture: Integration of Improved YOLOv5 and IoT Technology for Efficient Codling Moth Detection
Effective pest management remains a persistent challenge in precision agriculture, particularly due to the difficulty of accurately detecting small insects in cluttered trap environments under varying lighting and background conditions. Traditional methods often require labor-intensive inspections, while existing deep learning-based object detectors, such as standard YOLO models, face trade-offs between detection accuracy and computational feasibility on edge devices. This study introduces an improved version of the YOLOv5m model tailored for deployment on a Raspberry Pi-based smart insect trap, targeting codling moth (Cydia pomonella) detection. The proposed architecture incorporates a Convolutional Block Attention Module (CBAM) to enhance feature representation and reduce background interference, along with strategic filter reduction to lower computational complexity. As a result, the model achieves a maximum confidence level of 95% and an average of 91.36%, with reduced parameter count and a FLOPs value of 26.88 billion. Integration with the Firebase IoT platform enables real-time monitoring and remote data management. Comparative analysis with YOLOv5–YOLOv12 variants demonstrates that the improved YOLOv5m offers the best balance between accuracy and efficiency for low-power deployment. These findings highlight the potential of combining lightweight deep learning and IoT infrastructure to create scalable, energy-efficient, and sustainable pest detection systems for real-world agricultural applications.
Authors
- Samira Chaba
Institutions
- Cadi Ayyad University (MA)
- Université Ibn Zohr (MA)
Publication Details
- Journal
- Computing&AI Connect
- Published
- 2025-12-31
- DOI
- https://doi.org/10.69709/caic.2025.150921
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00