A YOLOv5-based Deep Learning Model for In-Situ Detection and Maturity Grading of Mango
Jonathan S. Ignacio, Katreen Nicole A. Eisma, Meo Vincent C. Caya
Abstract
In this paper, the researchers focused on identifying mangoes using YOLOv5 and classifying their degree of ripeness using CIELAB color space. The researchers used YOLOv5 to identify mangoes and CIELAB to classify their ripeness in this study. CIELAB is the recommended color system because it closely resembles how the human eye perceives color. Because the OpenCV feature reads frames in RGB, the researchers need a way to transform those RGB pixels into the more common L*a*b* color space. L* (lightness), a* (red-green), and b* (blue-yellow) are the three dimensions in which colors are defined in the CIELAB system (yellow-blue). The researchers used both the* and b* channels to determine the range of ripe and unripe mangoes. The system operates on a Raspberry Pi 4 connected to a camera that captures real-time video feed. Results showed that the gadget could recognize mangoes even when mixed with other fruit types with comparable sizes, shapes, and colors. However, there are times when the device may mistake a lemon for a mango, possibly due to the camera’s poor color perception, darkened areas within the acquired image, or insufficient illumination. The researchers suggest selecting a response time between three and five seconds as the camera must accurately detect the fruit. Overall, the accuracy values obtained from the tests done under artificial and actual in-store lighting were 86.26% and 83.08%.