Resumo:
The supermarket sector faces operational challenges related to shelf management, particularly regarding product availability monitoring and out-of-stock prevention. In this context, Artificial Intelligence (AI) and computer vision techniques have increasingly been applied to automate product recognition and counting processes in retail environments. However, although Deep Learning (DL) approaches achieve high performance in object detection tasks, their application requires greater computational capacity and large volumes of labeled data, which may limit their adoption in small and medium-sized supermarkets. Given this scenario, this study aims to develop software for product recognition and count on supermarket shelves, applying Machine Learning (ML) and Deep Learning (DL) techniques and evaluating the performance and limitations of each approach. It is worth highlighting that both approaches were applied to the same problem but operate differently: classical ML performs product classification, while YOLO11 carries out detection, localization, and counting in an integrated manner. The research was structured according to the CRISP-DM methodology, covering the stages of business understanding, data understanding, preparation, modeling, and evaluation. For the development of the study, images were collected in a simulated supermarket environment and organized into labeled datasets for model training and validation. In the ML approach, classical image descriptors such as HOG, HSV, and ORB were combined with supervised algorithms, including Logistic Regression, KNN, Linear SVM, SVM with RBF kernel, Random Forest, and Extra Trees. The ML model based on the HSV+HOG+ORB combination with Random Forest achieved 97.50% accuracy and F1-score in the classification of individual product crops. However, when applied to the real task of detection and counting in complete shelf images, the system did not achieve satisfactory performance, producing inconsistent counts and expressive overcounting bias in dense scenes. In the DL approach, the YOLOv11s architecture with Transfer Learning was trained on 3,042 images, achieving mAP@50 of 86.40%, Precision of 87.90%, Recall of 76.20%, and F1-score of 81.60%, demonstrating consistent performance in product detection, localization, and counting in real supermarket shelf images. The results demonstrate that, although classical ML achieved excellent performance as a classifier in controlled scenarios, the dependence on HSV color segmentation made the approach insufficient for the real problem of product localization and counting in complex environments. In contrast, YOLOv11s demonstrated more suitable performance for real automated shelf-monitoring applications. The study demonstrates the feasibility of computer vision applied to Brazilian supermarket retail and indicates Deep Learning as the most appropriate approach for automatic product recognition and counting tasks in real-world scenarios.