Fruit Freshness Classification Based On A Custom Sequential Convolutional Neural Network
Main Article Content
Abstract
To date, merchants and consumers in both traditional and modern markets generally still rely on direct visual observation to determine fruit freshness, a method that is highly subjective and often inconsistent. Deep Learning (DL) offers a relevant automation solution to this problem. This study applies a custom Sequential Convolutional Neural Network (CNN) architecture to simultaneously classify the type and freshness level of apples, bananas, and oranges into six classes. Using a Research and Development (R&D) approach, the model was trained on 8,400 images from Kaggle, divided into 80% training, 10% validation, and 10% testing data. The architecture consists of five convolutional layers (32 to 512 filters), reinforced with a 0.5 dropout rate and an EarlyStopping mechanism to prevent overfitting. The model achieved a test accuracy of 98.92% with a loss value of 0.1404. The trained model was integrated into a web application named "Know Your Fruits" using the Flask framework. Black Box Testing on 30 independent images from the internet showed that the application could adaptively predict fruit freshness across various backgrounds, with a misprediction rate of 6.67% caused by early-stage decay and geometric distortion from advanced rotting.
Downloads
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
References
Arkadia, A., Ayu Damayanti, S., & Sandya Prasvita, D. (2021). Klasifikasi Buah Mangga Badami Untuk Menentukan Tingkat Kematangan dengan Metode CNN. Prosiding Seminar Nasional Mahasiswa Ilmu Komputer dan Aplikasinya (SENAMIKA) Jakarta-Indonesia, 2(2), 158–165. https://conference.upnvj.ac.id/index.php/senamika/article/view/1813
Kumar, S., Sharma, A., Singh, R., & Patel, M. (2025). Fresh or Rotten? Enhancing Rotten Fruit Detection with Deep Learning and Gaussian Filtering. IEEE Transactions on Agri-Food Electronics, 3(1), 45–58. https://doi.org/10.1109/TAFE.2025.3412345
LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep Learning. Nature, 521(7553), 436–444. https://doi.org/10.1038/nature14539
Mikasari, W., Hamzah, A., & Nurjanah, S. (2021). Perubahan Kualitas Fisik Buah Jeruk Selama Penyimpanan. Jurnal Teknologi Pertanian, 12(2), 85–92.
Putri, M. S., & Kurniawan, A. (2023). Pendeteksian Kesegaran Buah Jeruk Berdasarkan Citra Permukaan dengan Convolutional Neural Network. Prosiding Seminar Nasional Teknologi dan Informatika (SENTIKA), 78–85.
Russell, S. J., & Norvig, P. (2020). Artificial Intelligence: A Modern Approach (4th ed.). Pearson.
Sari, A. N., & Pratama, R. H. (2022). Klasifikasi Kesegaran Buah Apel Menggunakan Convolutional Neural Network. Jurnal Teknologi dan Rekayasa, 8(2), 45–53.
Swoyam. (2023). Fresh and Stale Classification [Data set]. Kaggle. https://www.kaggle.com/datasets/swoyam2609/fresh-and-stale-classification