A fully automated, cashier-less retail checkout system powered by Computer Vision. This project uses YOLOv8 for real-time object detection and Streamlit for the Point of Sale (POS) interface. It mimics systems like Amazon Go, allowing users to scan items via webcam, generate bills automatically, and manage inventory.
This project implements Several Advanced Features to simulate a real-world retail environment:
- ✅ Multi-Object Tracking: Uses ByteTrack to ensure items are counted only once, even if they stay in the frame.
- 🗣️ Voice Feedback: Audio confirmation ("Maggi added - ₹14") using
pyttsx3. - 🧾 Auto-Invoice Generation: Generates a professional PDF receipt instantly upon checkout.
- 💳 UPI QR Payment: Dynamically generates a UPI QR code for contactless payment.
- 📊 Admin Dashboard: A secured tab for store owners to view sales analytics and manage stock.
- 🎥 Multi-Angle Simulation: Simulates a top-down camera view using image processing techniques.
- 👤 User Profile & History: Login system with persistent purchase history and wallet balance.
SmartCheckout/
│
├── database/
│ └── shop.db # SQLite database (Users, Inventory, Sales)
├── raw_images/ # Source images for training
├── datasets/ # Processed YOLO format dataset
├── app.py # Main Streamlit Application
├── train_yolo.py # Script to train the model
├── data_parsing.py # Script to convert CSV annotations to YOLO format
├── best.pt # Trained YOLOv8 Model Weights
├── requirements.txt # Python dependencies
├── data.yaml # YOLO configuration file
└── README.md # Project Documentation
The YOLOv8 Nano model was trained on a custom dataset for 30 epochs. Below are the key performance metrics:
| Metric | Value | Description |
|---|---|---|
| mAP50 | 0.89 | Mean Average Precision at 0.5 IoU |
| Precision | 0.92 | Accuracy of positive predictions |
| Recall | 0.82 | Ability to find all positive samples |
Results
Confusion Matrix
F1-Curve
git clone https://github.com/your-username/SmartCheckout.git
cd SmartCheckout
# Windows
python -m venv venv
venv\Scripts\activate
# Mac/Linux
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
If best.pt is already present in the folder:
streamlit run app.py-
Prepare Data:
Place images inraw_images/and the CSV file in the root directory.python data_parsing.py
-
Train Model:
python train_yolo.py
-
Run App:
streamlit run app.py
| Role | Username | Password |
|---|---|---|
| User | user | 1234 |
| Admin | admin | admin |
- Navigate to “🛒 Live Checkout”.
- Toggle “Start Scanning System”.
- Show items (e.g., Maggi, Jim Jam, etc.) to the webcam.
- Review the Live Invoice on the right panel.
- Click ✅ Finalize & Print.
- Scan the QR code or download the PDF receipt.
| Technology | Purpose |
|---|---|
| Python 3.9 | Core programming language |
| Ultralytics YOLOv8 | Object detection & tracking |
| Streamlit | Web interface |
| OpenCV | Image processing |
| SQLite3 | Local database management |
| ReportLab | PDF generation |
- Integration with physical load cells (IoT) for real weight verification.
- Deployment on NVIDIA Jetson Nano for edge computing.
- Integration with Stripe/Razorpay API for real payment processing.