Inspiration

SnapStock was born from the staggering reality that over $100B+ is lost globally to inventory loss every year. We observed that retailers lose approximately 1.6% of their revenue due to theft, waste, and errors. With over 30M+ small retailers having zero real-time visibility into shrinkage and relying on manual audits that only happen a few times a year, we saw a massive gap. We wanted to prove that high-speed, computer vision-driven inventory isn't just for billion-dollar stores; it should be as easy as taking a snapshot.

What it does

SnapStock is an AI-powered inventory assistant that turns a photo into a data point. The core philosophy is: "Point a camera. Get the truth." The Snap-Count: It uses YOLOv11 to identify and count individual products, even in crowded rows, with surgical precision. Discrepancy Analysis: The system integrates with POS systems to detect inventory losses the moment they occur. Value at Risk: It converts shrinkage into precise dollar amounts (e.g., "$67 lost" instead of just "8 items missing"). Real-time Monitoring: Results appear in real-time, providing exact losses and inventory status immediately.

How we built it

We prioritized a high-performance, modern architecture - The Vision Engine: We implemented YOLOv11 Nano, utilizing a high-resolution inference strategy (imgsz=1280) and optimized IoU thresholds (0.3) to accurately separate tightly packed items. Backend & Data: We built a FastAPI backend for asynchronous processing and transitioned to a MongoDB document store for flexible inventory stats and metadata. Annotation: We used OpenCV to render thin, high-contrast red bounding boxes (half-thickness) for clear visual verification. AI Feedback: We integrated an AI chatbot to provide accurate feedback on larger datasets and inventory trends.

Challenges we ran into

The "Crowded Shelf" Problem: Standard models often merged overlapping products. We overcame this by upgrading to YOLOv11 from the older YOLOv8 and fine-tuning the Intersection over Union (IoU) to ensure each can was seen individually. Confidence Calibration: We faced low confidence scores despite accurate counts. We solved this by implementing Test-Time Augmentation (TTA) and maximizing resolution to preserve label clarity. Dependency Management: We resolved significant version conflicts between FastAPI (0.104.1) and AnyIO, requiring a strictly versioned requirements.txt.

Accomplishments that we're proud of

Precision at Scale: Successfully identifying and counting 26+ tightly packed items in a single frame with near-perfect accuracy.

What we learned

We learned that the "last mile" of AI is about calibration, specifically how lighting and glare on aluminum affect detection confidence. We also gained deep experience in NoSQL database migration and the nuances of mapping real-time camera feeds to gap analysis engines.

What's next for SnapStock

Mobile App: Developing dedicated apps for store owners to receive real-time anomaly alerts. Predictive Analytics: Building tools for predictive loss analytics and franchise rollout. POS Integration: Deepening the connection with POS systems for a completely seamless workflow.

Share this project:

Updates