Back

Computer Vision–Based Autonomous Checkout System

Computer Vision-Based Autonomous Checkout System revolutionizes small retail by eliminating manual scanning through Raspberry Pi-powered computer vision

Dashboard Overview

Project Overview

Traditional retail suffers long checkout queues, manual scanning errors, and high cashier costs that burden small stores. This Smart Cart System solves these with Raspberry Pi-based computer vision that instantly recognizes products under an overhead camera. Items auto-populate a digital cart with real-time pricing, eliminating barcode dependency completely. A responsive web frontend enables seamless cart review, quantity adjustments, and integrated payments. Deployed as edge solution, it requires no cloud connectivity for core operations.

Model Architecture

System Architecture

Hardware centers on Raspberry Pi 3B+ (2GB RAM minimum) paired with Logitech C920 USB camera positioned 30-40cm overhead at 90° angle. LED strips ensure shadow-free imaging while 5V/3A power supply maintains stability during inference peaks. Software splits into Python 3.11 backend using OpenCV/TensorFlow Lite (INT8 quantized MobileNetV2) and HTML5/JS frontend with WebSocket communication. Backend runs on port 8765, frontend HTTP server on 8000, sharing SQLite cart data. This modular stack optimizes for Pi's ARM constraints while supporting 4 product classes initially.

Training Metrics

Model Pipeline

MobileNetV2 model processes 96x96x3 RGB inputs through INT8 quantization for 3-second inference on Pi hardware. Pipeline captures frames, discards 5-buffer frames for stability, preprocesses via resize/normalization, then runs detection yielding class/confidence scores. Products like "bru", "cake", "dairymilk", "lays" trigger database price lookups and cart updates via WebSockets. 95% accuracy demands 100+ training images per class with augmentation for rotation/lighting variance. Frontend overlays bounding boxes and confidence (85% threshold) for user verification.

Real-time Analytics

Deployment Workflow

Installation begins with Raspbian Bookworm update, virtualenv setup, and pip installs (OpenCV, tflite-runtime, websockets, numpy). Backend.py launches camera monitoring while separate terminal runs python3 -m http.server 8000 for frontend access. Network users connect via Pi IP:8000, updating WebSocket URL from localhost to actual IP. Operation flow: place product → click scan → review detection → add to cart → adjust quantities → proceed to payment. Dual-terminal startup and port configuration (8765/8000) enable rapid deployment.

Performance Insights

Production Operations

Daily maintenance checks camera lens, lighting consistency, WebSocket connectivity, Pi temperature (greater than 70°C), and disk space. Weekly tasks include security updates, log cleanup, full system tests verifying all products. Model retraining addresses accuracy drops from environmental changes, using deployment-matched datasets. Security upgrades for production add HTTPS, VLAN isolation, authentication layers beyond current HTTP-only local network. Performance monitoring via htop iftop confirms 50-70% CPU, 100ms latency, scaling-ready via multi-Pi MQTT clusters.

1 / 5

Source Code

Explore the complete implementation including hardware setup guides, trained models, backend API, and frontend interface. Full documentation covers installation, deployment, and production optimization.

View on GitHub

Technologies Used

Python 3.11 OpenCV TensorFlow Lite MobileNetV2 WebSockets Raspberry Pi HTML5/CSS3 JavaScript Computer Vision

Key Features

Real-time product detection using overhead USB camera (1-3s inference), Automatic digital cart population without barcode scanning, WebSocket-powered live cart updates across devices, Multi-product support (bru, cake, dairymilk, lays - scalable), Payment-ready checkout interface with quantity adjustment

Impact

Eliminates checkout queues reducing wait times from minutes to seconds, Cuts cashier labor costs by 70% for small kirana stores, Greater than 95% accuracy with INT8 quantized models on Raspberry Pi hardware, Enables contactless hygienic shopping, Low-cost ($100) AI automation for micro-retailers

Timeline

Duration: 4 months, Status: Production Ready, Last Updated: January 2025