Implementation of a Convolutional Neural Network Algorithm in Classifying Vegetable Freshness Based on Image

  • Dysa Handira Program Studi Ilmu Komputer, Fakultas Sains Dan Teknologi, Universitas Islam Negeri Sumatera Utara, Medan
  • Muhammad Siddik Hasibuan Program Studi Ilmu Komputer, Fakultas Sains Dan Teknologi, Universitas Islam Negeri Sumatera Utara, Medan
Keywords: Convolutional Neural Network (CNN), Image classification, Digital image processing

Abstract

The purpose of this work is to apply CNN algorithm to a real problem of vegetable freshness identification using image data. Quantitative approach was used for this study and the data source was obtained from Kaggle; it is referred to as Fresh and Stale Images of Fruits and Vegetables with 2,604 images, four categories in total. The CNN model architecture consisted of a basic organization of four successive convolutional layers with associated max-pooling layers that aimed at capturing hierarchical feature representations of the input images. This model was trained using the Adam’s optimizer for 20 iterations with the batch size of 32. Pre-processing of data included image augmentations such as scaling, rotation, flipping which improved the performance of the model. The assessment was done using Confusion Matrix approach and the results show that the proposed system achieved an accuracy of 95%, with a precision of 94%, recall of 93% and F1-score of 93%. From this it can be concluded that the CNN model proposed has achieved the objective of distinguishing fresh and non-fresh vegetables with enough precision to assist in the automation of quality control in agriculture. The conclusion that can be drawn from this study is that AI especially CNNs could be of big help in increasing accuracy and decreasing human factors in the large scale production of food.

References

Akande, T. O., Alabi, O. O., & Ajagbe, S. A. (2022). A deep learning-based CAE approach for simulating 3D vehicle wheels under real-world conditions. In Artificial Intelligence and Applications. https://doi.org/10.47852/bonviewAIA42021882

Alzubaidi, L., Zhang, J., Humaidi, A. J., Al-Dujaili, A., Duan, Y., Al-Shamma, O., ... & Farhan, L. (2021). Review of deep learning: concepts, CNN architectures, challenges, applications, future directions. Journal of big Data, 8, 1-74. https://doi.org/10.1186/s40537-021-00444-8

Chaudhari, A. S., Sandino, C. M., Cole, E. K., Larson, D. B., Gold, G. E., Vasanawala, S. S., ... & Langlotz, C. P. (2021). Prospective deployment of deep learning in MRI: a framework for important considerations, challenges, and recommendations for best practices. Journal of Magnetic Resonance Imaging, 54(2), 357-371. https://doi.org/10.1002/jmri.27331

Chen, L. (2017). Continuous delivery: overcoming adoption challenges. Journal of Systems and Software, 128, 72-86. https://doi.org/10.1016/j.jss.2017.02.013

Cioffi, R., Travaglioni, M., Piscitelli, G., Petrillo, A., & De Felice, F. (2020). Artificial intelligence and machine learning applications in smart production: Progress, trends, and directions. Sustainability, 12(2), 492. https://doi.org/10.3390/su12020492

Efendi, A. M. A., Sriani, S., & Hasibuan, M. S. (2024). Classification of Watermelon Ripeness Levels Using HSV Color Space Transformation and K-Nearest Neighbor Method. Journal of Computer Networks, Architecture and High Performance Computing, 6(3), 934-948. https://doi.org/10.47709/cnahpc.v6i3.3999

Elhanashi, A., Dini, P., Saponara, S., & Zheng, Q. (2023). Integration of deep learning into the iot: A survey of techniques and challenges for real-world applications. Electronics, 12(24), 4925. https://doi.org/10.3390/electronics12244925

Eller, L., Svoboda, P., & Rupp, M. (2022). A deep learning network planner: Propagation modeling using real-world measurements and a 3D city model. IEEE Access, 10, 122182-122196. https://doi.org/10.1109/ACCESS.2022.3223097

El-Ramady, H. R., Domokos-Szabolcsy, É., Abdalla, N. A., Taha, H. S., & Fári, M. (2015). Postharvest management of fruits and vegetables storage. Sustainable Agriculture Reviews: Volume 15, 65-152. https://doi.org/10.1007/978-3-319-09132-7_2

Gill, S. S., Xu, M., Ottaviani, C., Patros, P., Bahsoon, R., Shaghaghi, A., ... & Uhlig, S. (2022). AI for next generation computing: Emerging trends and future directions. Internet of Things, 19, 100514. https://doi.org/10.1016/j.iot.2022.100514

Hidayat, A. R., & Lusiana, V. (2022). Deteksi Jenis Sayuran dengan Tensorflow Dengan Metode Convolutional Neural Network. J-SAKTI (Jurnal Sains Komputer dan Informatika), 6(2), 1032-1040. http://dx.doi.org/10.30645/j-sakti.v6i2.512

Kattenborn, T., Leitloff, J., Schiefer, F., & Hinz, S. (2021). Review on Convolutional Neural Networks (CNN) in vegetation remote sensing. ISPRS journal of photogrammetry and remote sensing, 173, 24-49. https://doi.org/10.1016/j.isprsjprs.2020.12.010

Ketkar, N., Moolayil, J., Ketkar, N., & Moolayil, J. (2021). Convolutional neural networks. Deep learning with Python: learn best practices of deep learning models with PyTorch, 197-242. https://doi.org/10.1007/978-1-4842-5364-9_6

Kiyasseh, D., Zhu, T., & Clifton, D. (2021). A clinical deep learning framework for continually learning from cardiac signals across diseases, time, modalities, and institutions. Nature Communications, 12(1), 4221. https://doi.org/10.1038/s41467-021-24483-0

Li, L., Rong, S., Wang, R., & Yu, S. (2021). Recent advances in artificial intelligence and machine learning for nonlinear relationship analysis and process control in drinking water treatment: A review. Chemical Engineering Journal, 405, 126673. https://doi.org/10.1016/j.cej.2020.126673

Li, Z., Liu, F., Yang, W., Peng, S., & Zhou, J. (2021). A survey of convolutional neural networks: analysis, applications, and prospects. IEEE transactions on neural networks and learning systems, 33(12), 6999-7019. https://doi.org/10.1109/TNNLS.2021.3084827

Lubis, C. (2022). Klasifikasi Buah Segar Dan Busuk Menggunakan Convolutional Neural Network Berbasis Android. Jurnal Ilmu Komputer dan Sistem Informasi, 10(2). https://doi.org/10.24912/jiksi.v10i2.22551

Paraijun, F., Aziza, R. N., & Kuswardani, D. (2022). Implementasi Algoritma Convolutional Neural Network dalam Klasifikasi Kesegaran Buah Berdasarkan Citra Buah. KILAT, 11, No 1, 1–9. https://doi.org/10.33322/kilat.v10i2.1458

Putri, O. N. (2020). Implementasi Metode CNN Dalam Klasifikasi Gambar Jamur Pada Analisis Image Processing. Dspc Repository, 23-27. https://dspace.uii.ac.id/

Romario, M. H., Ihsanto, E., & Kadarina, M. T. (2020). Sistem Hitung dan Klasifikasi Objek dengan Metode Convolutional Neural Network. Jurnal Teknologi Elektro, Universitas Mercu Buana, 11 (02), 108–114. https://doi.org/10.24912/jiksi.v10i2.22551

Salehi, A. W., Khan, S., Gupta, G., Alabduallah, B. I., Almjally, A., Alsolai, H., ... & Mellit, A. (2023). A study of CNN and transfer learning in medical imaging: Advantages, challenges, future scope. Sustainability, 15(7), 5930. https://doi.org/10.3390/su15075930

Shaikh, T. A., Rasool, T., & Lone, F. R. (2022). Towards leveraging the role of machine learning and artificial intelligence in precision agriculture and smart farming. Computers and Electronics in Agriculture, 198, 107119. https://doi.org/10.1016/j.compag.2022.107119

Taye, M. M. (2023). Theoretical understanding of convolutional neural network: Concepts, architectures, applications, future directions. Computation, 11(3), 52. https://doi.org/10.3390/computation11030052

Xie, S., Yu, Z., & Lv, Z. (2021). Multi-disease prediction based on deep learning: a survey. Computer Modeling in Engineering & Sciences, 128(2), 489-522. https://doi.org/10.32604/cmes.2021.016728

Zhang, K., & Aslan, A. B. (2021). AI technologies for education: Recent research & future directions. Computers and Education: Artificial Intelligence, 2, 100025. https://doi.org/10.1016/j.caeai.2021.100025

Zhou, S. K., Greenspan, H., Davatzikos, C., Duncan, J. S., Van Ginneken, B., Madabhushi, A., ... & Summers, R. M. (2021). A review of deep learning in medical imaging: Imaging traits, technology trends, case studies with progress highlights, and future promises. Proceedings of the IEEE, 109(5), 820-838. https://doi.org/10.1109/JPROC.2021.3054390

Zhu, Z., Wang, X., Zhao, W., Min, C., Deng, N., Dou, M., ... & Huang, G. (2024). Is sora a world simulator? a comprehensive survey on general world models and beyond. arXiv preprint arXiv:2405.03520. https://doi.org/10.48550/arXiv.2405.03520

Published
2024-08-13
How to Cite
Handira, D., & Hasibuan, M. S. (2024). Implementation of a Convolutional Neural Network Algorithm in Classifying Vegetable Freshness Based on Image. Journal La Multiapp, 5(4), 424-439. https://doi.org/10.37899/journallamultiapp.v5i4.1461