Title: Onion Image Classification Based on Transfer Learning with MobileNetV2
Authors: Yousef A. AL_Afifi, Samy S. Abu-Naser
Volume: 10
Issue: 2
Pages: 78-84
Publication Date: 2026/02/28
Abstract:
Onion type recognition from images can support agricultural monitoring and automated sor-ng systems. In this paper, a deep learning approach is presented for classifying onion images into three categories: Onion Red, Onion Red Peeled, and Onion White. The experiments were conducted using a public onion dataset ("Onion Dataset-3"), which was cleaned and restructured for training in Google Colab. A transfer learning model based on MobileNetV2 was trained using TensorFlow/Keras. The dataset contains 1784 images and was split into training (60%), validation (20%) and testing (20%) subsets using a fixed random seed to ensure reproducibility. The proposed model achieved perfect performance on the testing dataset with an accuracy of 100% and a testing loss of 0.001. The confusion matrix shows correct Classification of all validation samples (12 Onion Red, 120 Onion Red Peeled, and 117 Onion White). Although the obtained results are highly promising, additional evaluation on an independent test set and real-world images is recommended to confirm generalization.