Deep learning detects scar damage on bananas with compact model

An Efficient Approach to Beetle Damage Detection of Banana Using Deep Learning

Computer Vision and Pattern RecognitionMachine Learning

Summary

Bananas can get scar-like damage on their surface caused by beetles, which makes them less valuable to sell. Checking bananas by hand is slow and can miss problems. The authors created a small and fast computer program using deep learning to find bananas in photos and tell if they look healthy or scarred. They trained this program with thousands of pictures of bananas from markets in Bangladesh and tested it to see how well it works. Their method is accurate and efficient enough to use in real banana inspections.

What this means in practice

Authors

Md. Mehedi Hasan Naeem, Ishtiyak Ahmmad Araf, Md. Arefin Haque Mahir, Tushar Kanti Saha

Abstract

Visible surface damage of banana fruits by Basilepta subcostata (the banana fruit scarring beetle) can reduce their market value. Here, manual inspection of Banana fruits is subjective and difficult to scale. This study presents a lightweight framework based on YOLOv8n deep learning model for locating individual bananas and classifying their visible surface condition as healthy or unhealthy. The term beetle damage in the paper title is used operationally for the locally observed scar-like surface condition; the model does not identify a specific beetle species or biological cause. A custom dataset of 2,473 images containing 5,827 annotated banana instances was prepared from local-market imagery in Bangladesh. The reported experiment used an 80/20 protocol with 1,982 training images and 491 test images. A pretrained YOLOv8n model was trained at 640x640 resolution for 50 epochs with a batch size of 4. On the test partition, it achieved 81.36% precision, 74.30% recall, 77.67% F1-score, 87.04% mAP@0.50 and 59.33% mAP@0.50:0.95. A YOLOv8s comparison gave slightly lower F1 and mAP while using a substantially larger checkpoint. The YOLOv8n checkpoint occupied 5.96 MB and required 6.54 ms/image for inference on an NVIDIA Tesla T4. The results support YOLOv8n as a compact baseline for instance-level banana surface inspection within the studied acquisition conditions.