Anaquel Inteligente 3B is a real-time shelf inventory monitoring system built for Tiendas 3B convenience stores. A YOLOv8-seg model watches a camera feed trained on 7 specific SKUs, detects when customers pick up or return products, and immediately updates inventory counters — all without QR codes, RFID tags, or manual intervention. Results stream live to a React dashboard via WebSocket, including depletion predictions, a slot activity heatmap, and intelligent narrative alerts in Spanish.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/elzackarias/Hackaton3B-Reto1/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Set up the backend and frontend, run the server, and see live inventory updates in under 10 minutes.
Architecture
Understand the full data pipeline from camera frame to dashboard event.
API Reference
Explore all REST endpoints and WebSocket events exposed by the FastAPI backend.
Detection Engine
Learn how YOLOv8-seg detects products and generates inventory change events.
How It Works
Camera captures frames
A fixed 5 MP camera (USB or RTSP) streams frames at up to 5 FPS. The
CameraCapture module handles reconnection automatically.YOLOv8-seg detects products
The
DetectionEngine runs inference on every frame and counts visible instances of each of the 7 trained SKUs. A 3-frame consistency check and per-slot cooldown prevent false positives.InventoryEngine updates stock
When a removal or return is confirmed,
InventoryEngine.process_event() atomically updates stock counters, triggers alerts when stock falls below the configurable threshold (default 20%), and fires observer callbacks.Intelligence engines enrich data
PredictionEngine forecasts time-to-stockout using exponential smoothing. HeatmapEngine aggregates slot activity. NarrativeEngine generates human-readable status messages in Spanish.Key Features
Computer Vision
YOLOv8-seg trained on 7 real Tiendas 3B products. Detects product counts per slot with bounding boxes and confidence scores.
Anti-False-Positive
3-frame consistency check plus a per-slot cooldown timer prevent double-decrements and flickering detections.
Depletion Prediction
Exponential smoothing (α=0.3) over removal timestamps predicts minutes until stockout per SKU.
Activity Heatmap
Slot interaction counts within a configurable time window, returned as a structured JSON map.
Narrative Alerts
Auto-generated Spanish messages for removals, returns, threshold breaches, and predictive warnings.
Smart Restock
Priority-scored restock queue combines units missing, sales velocity (iventa), and fill rate.