Real-Time Classification of Coconut Oil Quality using Smartphone Imaging and Deep Learning
DOI:
https://doi.org/10.58982/yntsh472Keywords:
Coconut Oil; Deep Learning; Smartphone Imaging; Real-Time Classification; Convolutional Neural Network; Quality AssessmentAbstract
Coconut oil quality assessment is important for ensuring product safety, commercial value, and consumer acceptance; however, conventional laboratory-based evaluation methods are often time-consuming, costly, and impractical for real-time applications. This study proposes a real-time coconut oil quality classification system using smartphone imaging integrated with a Convolutional Neural Network (CNN) model. A total of 60 coconut oil images were collected under controlled conditions and categorized into High Quality, Medium Quality, and Low Quality classes. The dataset underwent preprocessing stages including resizing, normalization, and augmentation before CNN training and evaluation. Experimental results showed that the proposed model achieved an accuracy of 93.33%, precision of 93.20%, recall of 92.80%, and F1-score of 93.00%, demonstrating reliable multi-class classification performance. In addition, the system achieved an average real-time prediction time of approximately 0.82 seconds per image on a smartphone device, indicating fast and efficient mobile-based implementation. The findings confirm that smartphone imaging combined with deep learning provides a portable, low-cost, non-destructive, and practical solution for intelligent coconut oil quality monitoring in food and agricultural applications.
References
[1] Food Science A. Marina, Y. B. Che Man, and I. Amin, “Virgin Coconut Oil: Emerging Functional Food Oil,” Trends in Food Science & Technology, vol. 20, no. 10, pp. 481–487, 2009.
[2] Analytical Chemistry S. Srivastava, R. Singh, and P. Sharma, “Physicochemical Properties and Quality Assessment of Coconut Oil,” Journal of Food Engineering, vol. 98, no. 4, pp. 456–462, 2018.
[3] Artificial Intelligence Convolutional Neural Network Y. LeCun, Y. Bengio, and G. Hinton, “Deep Learning,” Nature, vol. 521, no. 7553, pp. 436–444, 2015.
[4] Computer Vision A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet Classification with Deep Convolutional Neural Networks,” Advances in Neural Information Processing Systems, vol. 25, pp. 1097–1105, 2012.
[5] Smartphone Camera S. Li and W. Deng, “Deep Facial Expression Recognition: A Survey,” IEEE Transactions on Affective Computing, vol. 13, no. 3, pp. 1195–1215, 2022.
[6] Agricultural Engineering J. Kamilaris and F. X. Prenafeta-Boldú, “Deep Learning in Agriculture: A Survey,” Computers and Electronics in Agriculture, vol. 147, pp. 70–90, 2018.
[7] Food Technology M. A. Islam, M. Rahman, and M. Hossain, “Deep Learning-Based Edible Oil Classification Using Image Processing Techniques,” IEEE Access, vol. 9, pp. 145234–145245, 2021.
[8] TensorFlow M. Abadi et al., “TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems,” 2016.
[9] Keras F. Chollet, Deep Learning with Python. Shelter Island, NY, USA: Manning Publications, 2018.
[10] Machine Learning T. Fawcett, “An Introduction to ROC Analysis,” Pattern Recognition Letters, vol. 27, no. 8, pp. 861–874, 2006.
[11] Computer Vision R. C. Gonzalez and R. E. Woods, Digital Image Processing, 4th ed. Upper Saddle River, NJ, USA: Pearson, 2018.
[12] Artificial Intelligence C. M. Bishop, Pattern Recognition and Machine Learning. New York, NY, USA: Springer, 2006.
[13] Machine Learning D. P. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” International Conference on Learning Representations (ICLR), 2015.
[14] Softmax Function I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. Cambridge, MA, USA: MIT Press, 2016.
[15] Computer Science M. Satyanarayanan, “Mobile Computing: The Next Decade,” ACM SIGMOBILE Mobile Computing and Communications Review, vol. 15, no. 2, pp. 2–10, 2011.
[16] Agricultural Technology S. Wolfert, L. Ge, C. Verdouw, and M. J. Bogaardt, “Big Data in Smart Farming – A Review,” Agricultural Systems, vol. 153, pp. 69–80, 2017.
[17] Food Engineering N. A. Bakar, M. F. Salleh, and A. Rahman, “Quality Evaluation of Virgin Coconut Oil Using Computer Vision Techniques,” Journal of Food and Measurement and Characterization, vol. 14, no. 5, pp. 2554–2563, 2020.
[18] Artificial Intelligence K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778, 2016.
[19] Deep Learning A. G. Howard et al., “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications,” arXiv preprint arXiv:1704.04861, 2017.
[20] Artificial Intelligence M. Tan and Q. Le, “EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks,” Proceedings of the International Conference on Machine Learning (ICML), pp. 6105–6114, 2019.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 I Putu Budi Astawa, Putu Sugiartawan, N. W. Sumartini Saraswati

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.





















