Computer Vision-based Detection Models for Classifying Ripening Stages of Tomato Fruits

Main Article Content

Rotimi-Williams Bello, Pius A. Owolawi, Etienne A. van Wyk, Chunling Tu

Abstract

Introduction: Tomato fruits colour is a crucial aspect of tomato fruits cultivation as it guides farmers through the ripening stages. Accurate identification of the ripening stages of tomato fruits using their colours facilitates assessment of the level of their ripeness for timely harvesting, thereby improving quality control in horticulture. Four key ripening stages are involved in tomato fruits, namely green, turning, pink, and red ripe. These stages require constant monitoring to minimize waste and loss. However, little has been done to ensure constant monitoring of the ripening stages of this fruit, and most of the current methods employed for this task are uneconomical, labour intensive, time-consuming, and inaccurate.


Objectives: To address the abovementioned challenges and monitor the ripening progression of the tomato fruits.


Methods: YOLOv4 and ResNet50 were proposed for detecting and classifying their different colour stages. A dataset from Roboflow, which comprises 1050 images were collected and categorized into four classes of green, turning, pink, and red ripe, then augmented and employed in training the models on Google Colab, leveraging its cloud-based resources to efficiently manage the training process.


Results: The results obtained from the two models were compared to SSD MobileNet v2, and a proposed colour space model of HSV based on Histogram. In overall, YOLOv4 performed better in detection and worse in classification than ResNet50, however, the performance of the colour space model of HSV was better in classification than the models of YOLOv4 and ResNet50.


Conclusions: Comparing the performance of the models with each other in detection of tomato fruits, the confidence in the predictions of both models were close and similar, this simply means that at close and similar confidence thresholds of 57% and 59%, respectively, both models got their best F1-score and mAP; however, YOLOv4 model achieved a better F1-score of 89.50% and mAP of 83.20% than the F1-score of 77.01% and mAP of 71.01% achieved by the ResNet50 model. The colour space model of HSV for Green ripening tomato fruits obtained the highest percentage in all the evaluation metric for the classification with 97.45% precision, 98.11% recall, and 97.78% F1-score.

Article Details

Section
Articles