A lightweight YOLOv8 based on attention mechanism for mango pest and disease detection
摘要
Because the growth of mangoes is often affected by pests and diseases, the application of object detection technology can effectively solve this problem. However, deploying object detection models on mobile devices is challenging due to resource constraints and high-efficiency requirements. To address this issue, we reduced the parameters in the target detection model, facilitating its deployment on mobile devices to detect mango pests and diseases. This study introduced the improved lightweight target detection model GAS-YOLOv8. The model’s performance was improved through the following three modifications. First, the model backbone was replaced with GhostHGNetv2, significantly reducing the model parameters. Second, the lightweight detection head AsDDet was adopted to further decrease the parameters. Finally, to increase the detection accuracy of the lightweight model without significantly increasing parameters, the C2f module was replaced with the C2f-SE module. Validation with a publicly available dataset of mango pests and diseases showed that the accuracy for insect pests increased from 97.1 to 98.6%, the accuracy for diseases increased from 91.4 to 91.7%, and the model parameters decreased by 33%. This demonstrates that the GAS-YOLOv8 model effectively addresses the issues of large computational volume and challenging deployment for the detection of mango pests and diseases.