We use a few cookies

Essential cookies keep the library working. With your permission, we'd also like to use analytics to see what's useful and improve the experience. Read our Privacy Policy or Cookie Policy.

Skip to main content
Home/e-Resources/Computer Science & Information Technology/Improving Tomato Ripeness Classification Using Knowledge Distillation and Hyperparameter Optimization with Optuna
PeriodicalsComputer Science & Information Technology

Improving Tomato Ripeness Classification Using Knowledge Distillation and Hyperparameter Optimization with Optuna

Checking your access to this record.

Abstract & Overview

Automatic classification of tomato ripeness plays a crucial role in ensuring post-harvest quality and efficiency in the horticultural industry. This study proposes a combined strategy of Knowledge Distillation (KD) and hyperparameter optimization using Optuna to improve the accuracy of the ResNet50 student model by leveraging the performance of a MobileNetV2 teacher model.We used a publicly available Kaggle dataset containing 8,540 images, categorized into four ripeness levels (green, red, ripe, and rotten), comprising 7,157 training images and 1,383 validation images.Each image was resized to 224×224 pixels; light augmentation techniques (random rotation, brightness–contrast adjustment, flipping, and Gaussian blur) were applied only to the training set to prevent overfitting while maintaining consistency during evaluation.The MobileNetV2 teacher model was initially fine-tuned on the last 20 layers using manual hyperparameters (freeze_until = 20, dropout = 0.6), achieving an accuracy of 85.8%.Subsequent tuning via Optuna identified the optimal configuration (freeze_until = 91, dropout_rate = 0.5055), which improved the teacher’s performance to 89.6%.The resulting teacher model was then used to distill knowledge into the ResNet50 student: under manual settings, the student’s accuracy improved from 55.24% to 73.25%; when the student model was also optimized using Optuna, its accuracy surged to 85.54% nearly matching the teacher.Further evaluation using a confusion matrix and ROC curves revealed an increase in per-class AUC to the range of 0.91–0.99 in the KD + Optuna student model, confirming that this method effectively closes the performance gap between student and teacher.These findings demonstrate that combining KD with Optuna-based hyperparameter optimization is an effective approach for producing a lightweight, fast, and highly accurate tomato ripeness classification model ready for deployment in field applications to support post-harvest decision-making.

Cite this record

Iasya Sholihin, Andi Sunyoto (2025). Improving Tomato Ripeness Classification Using Knowledge Distillation and Hyperparameter Optimization with Optuna. JEECOM Journal of Electrical Engineering and Computer, 7(2), 282–290. https://doi.org/10.33650/jeecom.v7i2.11266

Copy in another style

Sholihin, I., & Sunyoto, A. (2025). Improving Tomato Ripeness Classification Using Knowledge Distillation and Hyperparameter Optimization with Optuna. JEECOM Journal of Electrical Engineering and Computer, 7(2), 282–290. https://doi.org/10.33650/jeecom.v7i2.11266
Author names are used as deposited, so check their order before you submit.

Metadata is harvested from open-access indexes and can be incomplete. Check a citation against the published version before relying on it — see our open access & attribution policy.