Real-Time Retail Shelf-Stock Detection with YOLOv7

Authors

  • Annies Alquratu SeptriaPS Department of Electrical Engineering, Applied Bachelor Program in Telecommunication Engineering, State Polytechnic of Sriwijaya, Indonesia https://orcid.org/0009-0002-1590-2114
  • Ade Silvia Handayani Department of Electrical Engineering, Applied Bachelor Program in Telecommunication Engineering, State Polytechnic of Sriwijaya, Indonesia https://orcid.org/0000-0002-4476-426X
  • Nasron Nasron Department of Electrical Engineering, Applied Bachelor Program in Telecommunication Engineering, State Polytechnic of Sriwijaya, Indonesia https://orcid.org/0009-0007-8961-316X

DOI:

https://doi.org/10.15408/jti.v18i2.46448

Keywords:

Inventory Management, Object Detection, Real-Time, YOLOv7

Abstract

This study developed a real-time shelf stock monitoring system for retail environments, leveraging the You Only Look Once version 7 (YOLOv7) deep learning-based object detection framework. The system effectively addresses the inefficiencies, delays, and errors inherent in manual stock auditing processes. The underlying model was trained on a comprehensive dataset comprising 15,397 annotated object labels across fifteen distinct retail product categories. The fully trained model was then integrated into a web-based platform designed to capture real-time shelf images via a webcam. These captured images undergo automated processing for product detection and counting. The detection results are dynamically displayed on an interactive dashboard and securely stored in a backend database. The system also incorporates voice alerts, which are triggered automatically when stock levels fall below predefined thresholds, thereby facilitating immediate restocking. Experimental validation indicates high performance, with both precision and recall exceeding 96%, and an average processing latency of less than one second per frame. The model achieved an mAP@0.5 of 0.996 and an mAP@0.5:0.95 of 0.86. These findings underscore the system's effectiveness in providing a rapid, accurate, and efficient monitoring solution specifically tailored for small to medium-sized retail businesses. The primary contribution of this research lies in its comprehensive, end-to-end system integration, combining robust YOLOv7-based object detection with real-time web visualization and automated voice alerts, successfully addressing existing gaps in prior implementations.

References

[1] S. Kang, Z. Hu, L. Liu, K. Zhang, and Z. Cao, “Object Detection YOLO Algorithms and Their Industrial Applications: Overview and Comparative Analysis,” Electron., vol. 14, no. 6, pp. 1–36, 2025, doi: 10.3390/electronics14061104.

[2] Y. Liu, H. Zhou, and M. Zhao, “Research on target detection based on improved YOLOv7 in complex traffic scenarios,” PLoS One, vol. 20, no. 5 May, 2025, doi: 10.1371/journal.pone.0323410.

[3] R. Digo Saputra and D. Hatta Fudholi, “Model Mobile untuk Deteksi Objek pada On-Shelf Availability Produk Retail,” 2023.

[4] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once: Unified, real-time object detection,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., vol. 2016-Decem, pp. 779–788, 2016, doi: 10.1109/CVPR.2016.91.

[5] R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Rich feature hierarchies for accurate object detection and semantic segmentation,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., pp. 580–587, 2014, doi: 10.1109/CVPR.2014.81.

[6] B. Huang, H. Lin, Z. Hu, X. Xiang, and J. Yao, “An improved YOLOv3-tiny algorithm for vehicle detection in natural scenes,” IET Cyber-systems Robot., vol. 3, no. 3, pp. 256–264, 2021, doi: 10.1049/csy2.12029.

[7] J. H. Kim, N. Kim, Y. W. Park, and C. S. Won, “Object Detection and Classification Based on YOLO-V5 with Improved Maritime Dataset,” J. Mar. Sci. Eng., vol. 10, no. 3, 2022, doi: 10.3390/jmse10030377.

[8] Y. Sun, Y. Li, S. Li, Z. Duan, H. Ning, and Y. Zhang, “PBA-YOLOv7: An Object Detection Method Based on an Improved YOLOv7 Network,” Appl. Sci., vol. 13, no. 18, 2023, doi: 10.3390/app131810436.

[9] J. Chen, S. Bai, G. Wan, and Y. Li, “Research on YOLOv7-based defect detection method for automotive running lights,” Syst. Sci. Control Eng., vol. 11, no. 1, 2023, doi: 10.1080/21642583.2023.2185916.

[10] X. Tang, C. Ruan, X. Li, B. Li, and C. Fu, “MSC-YOLO: Improved YOLOv7 Based on Multi-Scale Spatial Context for Small Object Detection in UAV-View,” Comput. Mater. Contin., vol. 79, no. 1, pp. 983–1003, 2024, doi: 10.32604/cmc.2024.047541.

[11] J. Wang and K. Xu, “An Accelerating Method of YOLOv7 Based on Lightweight Network Architecture,” Appl. Sci., vol. 15, no. 5, 2025, doi: 10.3390/app15052528.

[12] D. Wu et al., “Detection of Camellia oleifera Fruit in Complex Scenes by Using YOLOv7 and Data Augmentation,” Appl. Sci., vol. 12, no. 22, 2022, doi: 10.3390/app122211318.

[13] C. Li et al., “YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications,” 2022, [Online]. Available: http://arxiv.org/abs/2209.02976

[14] B. Li, Y. Chen, H. Xu, and F. Zhong, “Fast vehicle detection algorithm based on lightweight YOLO7-tiny,” Comput. Vis. Pattern Recognit., 2023.

[15] W. Gong, “Lightweight Object Detection: A Study Based on YOLOv7 Integrated with ShuffleNetv2 and Vision Transformer,” 2024, [Online]. Available: https://arxiv.org/abs/2403.01736v1

[16] S. Abba, A. M. Bizi, J. A. Lee, S. Bakouri, and M. L. Crespo, “Real-time object detection, tracking, and monitoring framework for security surveillance systems,” Heliyon, vol. 10, no. 15, p. e34922, 2024, doi: 10.1016/j.heliyon.2024.e34922.

[17] S. N. Katkade, V. C. Bagal, R. R. Manza, and P. L. Yannawar, “Advances in Real-Time Object Detection and Information Retrieval: A Review,” Artif. Intell. Appl., vol. 1, no. 3, pp. 139–144, 2023, doi: 10.47852/bonviewaia3202456.

[18] C. Wagh, “Object Detection and Tracking Using Deep Learning and OpenCV in Real Time Environment,” vol. 12, no. 04, pp. 356–361, 2023.

[19] A. Bochkovskiy, C.-Y. Wang, and H.-Y. M. Liao, “YOLOv4: Optimal Speed and Accuracy of Object Detection,” no. May, 2020, doi: 10.48550/arXiv.2004.10934.

[20] D. H. Fudholi, A. Kurniawardhani, G. I. Andaru, A. A. Alhanafi, and N. Najmudin, “YOLO-based Small-scaled Model for On-Shelf Availability in Retail,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 8, no. 2, pp. 265–271, 2024, doi: 10.29207/resti.v8i2.5600.

[21] Ikhsan Adi Putra, “Analisis Performa Arsitektur Model You Only Look Once (Yolo) Versi 7 Dalam Melakukan Segmentasi Jenis Virus Dari Citra Mikroskop,” pp. 56–57, 2023.

[22] F. Yang, X. Zhang, and B. Liu, “Video object tracking based on YOLOv7 and DeepSORT,” vol. 14, no. 8, pp. 2015–2018, 2022, [Online]. Available: http://arxiv.org/abs/2207.12202

[23] N. Rane, “YOLO and Faster R-CNN object detection for smart Industry 4.0 and Industry 5.0: applications, challenges, and opportunities,” SSRN Electron. J., 2023, doi: 10.2139/ssrn.4624206.

[24] F. Fui-Hoon Nah, R. Zheng, J. Cai, K. Siau, and L. Chen, “Generative AI and ChatGPT: Applications, challenges, and AI-human collaboration,” J. Inf. Technol. Case Appl. Res., vol. 25, no. 3, pp. 277–304, 2023, doi: 10.1080/15228053.2023.2233814.

[25] H. You et al., “Ferret: Refer and Ground Anything Anywhere At Any Granularity,” 12th Int. Conf. Learn. Represent. ICLR 2024, pp. 1–30, 2024.

[26] S. Sadhasivam, R. Banupriya, D. Sathiya, G. P. V, R. S. Hariharan, and P. Harish, “Advanced Object Counting System for Inventory Management Using YOLOv7 and Lightweight Attention Mechanisms,” no. Icsice 24, 2025, doi: 10.2991/978-94-6463-718-2.

[27] J. Redmon and A. Farhadi, “YOLOv3: An Incremental Improvement,” 2018, [Online]. Available: http://arxiv.org/abs/1804.02767

[28] A. Jha, “Application of Rfid and Barcode Technology in Increasing Efficiency of Supply Chain Management and Inventory Management,” vol. 9, no. 4, pp. 419–433, 2024, [Online]. Available: www.ijnrd.org

[29] M. Tejaswini, “Weapon Detection and Alert System Using Yolo Deeplearning Technique To Avoid Crimes and Theft,” Int. Res. J. Mod. Eng. Technol. Sci., no. 06, pp. 4028–4032, 2024, doi: 10.56726/irjmets59492.

[30] R. I. et Al, “Real-Time Shelf Gap Detection Using YOLOv8-Lite on Edge TPU,” IEEE ICIP, 2024.

[31] M. Yaseen, “What is YOLOv9: An In-Depth Exploration of the Internal Features of the Next-Generation Object Detector,” vol. 8, pp. 1–10, 2024, [Online]. Available: http://arxiv.org/abs/2409.07813

[32] J. Redmon and A. Farhadi, “YOLOv2 | YOLO9000 : Better, Faster, Stronger Joseph,” Cvpr2017, Xplore, no. April, pp. 187–213, 2017, [Online]. Available: http://www.worldscientific.com/doi/abs/10.1142/9789812771728_0012

[33] Roboflow Universe Dataset, “Empty Spaces Detection in Shelf Data,” 2024, [Online]. Available: universe.roboflow.com

[34] M. N. Zainol et al., “2ndICASE23B-Out-of-Stock Empty Space Detection Using YOLOv7 for Retail Products on Shelf for Inventory Management,” J. Adv. Res. Appl. Sci. Eng. Technol., vol. 64, no. 1, pp. 164–173, 2025, doi: 10.37934/araset.64.1.164173.

[35] B. G., “YOLOv7: Algoritma Deteksi Objek yang Kuat,” blog viso.ai, 2023, [Online]. Available: https://viso.ai/deep-learning/yolov7-guide/

Downloads

Published

2025-10-30

How to Cite

Real-Time Retail Shelf-Stock Detection with YOLOv7. (2025). JURNAL TEKNIK INFORMATIKA, 18(2), 327-338. https://doi.org/10.15408/jti.v18i2.46448