Ŕ Implementasi Deep Learning Untuk Klasifikasi Produk Grocery dan Deteksi Tanggal Kedaluwarsa Menggunakan Resnet50 dan Easyocr | Suwanda | Jurnal Ilmiah Universitas Batanghari Jambi

Implementasi Deep Learning Untuk Klasifikasi Produk Grocery dan Deteksi Tanggal Kedaluwarsa Menggunakan Resnet50 dan Easyocr

Faza Hanif Suwanda, Ekky Novriza Alam, Riska Yanu Fa'rifah

Abstract


Checking product categories and expiry dates in grocery stores is still largely done manually, making the process error-prone and time-consuming, especially for packaging with small or inconsistently formatted date prints. This research builds a two-stage pipeline that automatically classifies grocery product categories and detects expiry dates from product images. The method consists of an image classification model based on transfer learning with a frozen ResNet50 backbone, trained on three product categories (Fruits, Dairy Products, and Bread), and an expiry-date detection module leveraging the CRAFT text detector built into EasyOCR, combined with regular-expression matching and a tiered OCR fallback mechanism. The classification model was trained on 398 training images and evaluated on 98 validation images, achieving a validation accuracy of 83.67%, well above the 33.3% random-guess baseline for three classes, with the highest F1-score on the Dairy Products category (0.91). Testing of the date-detection pipeline on 63 test images showed a detection precision of 70.0% and an overall valid-date rate of 44.4%, indicating that a pragmatic approach based on a ready-made text detector can function without training a dedicated object detector, although reliability still needs improvement in filtering false-positive date candidates. Evaluation of the integrated system further found that the initial design assumption, that OCR should only run on packaged categories, was not entirely accurate, since the Fruits category showed a higher success rate (83.3%) than the packaged category (40.4%). The main contribution of this research is a pragmatic approach that leverages a ready-made text detector to locate very small date objects without training a dedicated object detector from scratch, allowing the pipeline to be implemented end-to-end under limited data and computing resources.

Keywords


image classification; deep learning; ResNet50; transfer learning; expiry date detection; OCR; EasyOCR

Full Text:

PDF

References


H. Peng, J. Bayón, J. Recas, and M. Guijarro, “Efficient expiration date recognition in food packages for mobile applications,” Algorithms, vol. 18, no. 5, p. 286, 2025, doi: 10.3390/a18050286.

I. M. Wiryana, S. Harmanto, A. Fauzi, I. B. Qisthi, and Z. N. Utami, “Store product classification using convolutional neural network,” IAES Int. J. Artif. Intell., vol. 12, no. 3, pp. 1439–1447, 2023, doi: 10.11591/ijai.v12.i3.pp1439-1447.

J. Zheng, J. Li, Z. Ding, L. Kong, and Q. Chen, “Recognition of expiry data on food packages based on improved DBNet,” Connect. Sci., vol. 35, no. 1, pp. 1–16, 2023, doi: 10.1080/09540091.2023.2202363.

L. Bu, C. Hu, and X. Zhang, “Recognition of food images based on transfer learning and ensemble learning,” PLOS ONE, vol. 19, 2024, doi: 10.1371/journal.pone.0296789.

M. Alghamdi, H. Mengash, M. Aljebreen, M. Maray, A. A. Darem, and A. S. Salama, “Empowering retail through advanced consumer product recognition using Aquila optimization algorithm with deep learning,” IEEE Access, vol. 12, pp. 71055–71065, 2024, doi: 10.1109/access.2024.3399480.

M. Purwono, A. Ma'arif, W. Rahmaniar, H. Fathurrahman, A. Frisky, and Q. Haq, “Understanding of convolutional neural network (CNN): A review,” Int. J. Robot. Control Syst., vol. 2, no. 4, pp. 613–627, 2023, doi: 10.31763/ijrcs.v2i4.888

N. A. Khandaker, A. Rahman, A. A. Pinky, and T. Anannya, “A deep convolutional neural network-based approach for visual search & recommendation of grocery products,” Ann. Data Sci., vol. 12, pp. 877–897, 2024, doi: 10.1007/s40745-024-00540-5.

P. Bohlol, S. Hosseinpour, and M. S. Firouz, “Improved food recognition using a refined ResNet50 architecture with improved fully connected layers,” Curr. Res. Food Sci., vol. 10, 2025, doi: 10.1016/j.crfs.2025.101005.

P. Selvam and J. A. S. Koilraj, “A deep learning framework for grocery product detection and recognition,” Food Anal. Methods, vol. 15, no. 12, pp. 3498–3522, 2022, doi: 10.1007/s12161-022-02384-2.

P. Selvam, M. Faheem, V. Dakshinamurthi, A. Nevgi, R. Bhuvaneswari, K. Deepak, and J. A. Sundar, “Batch normalization free rigorous feature flow neural network for grocery product recognition,” IEEE Access, vol. 12, pp. 68364–68381, 2024, doi: 10.1109/access.2024.3400844.

R. Alabdan, H. Alkahtani, K. M. Othman, R. Alroobaea, S. Algarni, A. A. K. Alharbi, and K. Shankar, “Advanced imaging technologies with ensemble learning for consumer products identification and classification,” IEEE Trans. Consum. Electron., vol. 70, pp. 7174–7182, 2024, doi: 10.1109/tce.2024.3393991.

S. S. Bhat, A. Ananth, and V. P. S., “Design and evolution of deep convolutional neural networks in image classification – A review,” Int. J. Integr. Eng., vol. 15, no. 1, 2023, doi: 10.30880/ijie.2023.15.01.019.

T. Pettersson, M. Riveiro, and T. Löfström, “Multimodal fine-grained grocery product recognition using image and OCR text,” Mach. Vis. Appl., vol. 35, 2024, doi: 10.1007/s00138-024-01549-9.

Y. Baek, B. Lee, D. Han, S. Yun, and H. Lee, “Character region awareness for text detection,” in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), 2019, pp. 9365–9374, doi: 10.1109/cvpr.2019.00959.




DOI: http://dx.doi.org/10.33087/jiubj.v26i2.6571

Refbacks

  • There are currently no refbacks.


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

ADRESS JOURNAL

JURNAL ILMIAH UNIVERSITAS BATANGHARI JAMBI (JIUBJ)
Published by Lembaga Penelitian dan Pengabdian kepada Masyarakat
Adress: Jl.Slamet Ryadi, Broni-Jambi, Kec.Telanaipura, Kodepos: 36122, email: jiubj.unbari@gmail.com, Phone: 0741-670700

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