π Presented at ICNCS 2025, VIT Chennai Hybrid LSTM + YOLOv8 system for predictive demand forecasting and real-time smart shelf monitoring
- Overview
- Key Features
- System Architecture
- Tech Stack
- Project Structure
- Getting Started
- Model Details
- Results
- Pipeline Workflow
- Conference
- Author
IntelliStock is an intelligent, hybrid inventory management system that combines the power of deep learning-based time series forecasting (LSTM/BiLSTM) with real-time computer vision (YOLOv8) to automate stock monitoring and predict demand before shortages occur.
Traditional inventory systems are reactive β they restock after products run out. IntelliStock flips this model by:
- π· Seeing shelf stock levels in real-time via camera feeds using YOLOv8
- π Predicting future demand using LSTM-based sequence modeling
- π Alerting when to reorder, before shelves go empty
This makes it ideal for retail stores, warehouses, supermarkets, and smart supply chains.
- π― Hybrid AI Pipeline β Seamlessly integrates YOLOv8 object detection with LSTM demand forecasting
- π Predictive Refill Alerts β Forecasts stock depletion before it happens
- πΌοΈ Image-Driven Inventory Tracking β Real shelf images β automatic item counts
- β‘ Scalable Batch Pipelines β Efficiently processes large-scale image and time-series data
- π Ultra-Low Forecasting Error β Achieved MAE = 0.0020 on test data
- π End-to-End Automation β From image capture to reorder recommendation, fully automated
- π¦ Modular Design β Vision and forecasting modules can be used independently
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β IntelliStock Pipeline β
β β
β π· Camera / Image Feed β
β β β
β βΌ β
β βββββββββββββββββββ βββββββββββββββββββββββββββββ β
β β YOLOv8 Module ββββββΆβ Stock Count Extractor β β
β β (Object Det.) β β (ROI-based Counting) β β
β βββββββββββββββββββ βββββββββββββ¬ββββββββββββββββ β
β β β
β βββββββββββββΌββββββββββββββββ β
β β Time Series Database β β
β β (Stock Level History) β β
β βββββββββββββ¬ββββββββββββββββ β
β β β
β βββββββββββββΌββββββββββββββββ β
β β LSTM / BiLSTM Forecaster β β
β β (Demand Prediction) β β
β βββββββββββββ¬ββββββββββββββββ β
β β β
β βββββββββββββΌββββββββββββββββ β
β β Alert & Reorder Engine β β
β β π¦ Refill Recommendation β β
β βββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Category | Tools |
|---|---|
| Computer Vision | YOLOv8 (Ultralytics), OpenCV |
| Deep Learning | PyTorch, LSTM, BiLSTM |
| Data Processing | Pandas, NumPy |
| Visualization | Matplotlib, Seaborn |
| ML Utilities | Scikit-learn |
| Deployment | Flask / Streamlit |
| Version Control | Git, GitHub |
| Language | Python 3.9+ |
IntelliStock/
β
βββ π data/
β βββ raw/ # Raw image datasets & sales records
β βββ processed/ # Cleaned & preprocessed data
β βββ time_series/ # Stock level time series data
β
βββ π models/
β βββ yolov8/ # YOLOv8 weights & config
β β βββ best.pt # Trained YOLOv8 model
β β βββ data.yaml # Dataset config
β βββ lstm/
β βββ lstm_model.pth # Trained LSTM weights
β βββ bilstm_model.pth # Trained BiLSTM weights
β
βββ π src/
β βββ detection/
β β βββ detect_shelf.py # YOLOv8 shelf detection
β β βββ roi_extractor.py # ROI-based stock counter
β βββ forecasting/
β β βββ lstm_model.py # LSTM architecture
β β βββ bilstm_model.py # BiLSTM architecture
β β βββ train.py # Training script
β βββ pipeline/
β β βββ batch_pipeline.py # Scalable batch processing
β β βββ alert_engine.py # Reorder alert system
β βββ utils/
β βββ preprocess.py # Data preprocessing
β βββ visualize.py # Plotting & dashboards
β
βββ π notebooks/
β βββ EDA.ipynb # Exploratory data analysis
β βββ LSTM_Training.ipynb # Model training walkthrough
β βββ YOLOv8_Training.ipynb # Vision model training
β
βββ π results/
β βββ metrics/ # MAE, RMSE, accuracy logs
β βββ plots/ # Forecast charts & detection outputs
β
βββ app.py # Streamlit / Flask app entry point
βββ requirements.txt
βββ README.md
Python >= 3.9
pip
Gitgit clone https://github.com/Akhila707/Intellistock.git
cd Intellistockpython -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windowspip install -r requirements.txtpython src/detection/detect_shelf.py --source data/raw/shelf_images/python src/forecasting/train.py --epochs 100 --model lstmpython src/pipeline/batch_pipeline.pystreamlit run app.py| Parameter | Value |
|---|---|
| Base Model | YOLOv8n / YOLOv8s |
| Task | Object Detection |
| Input | Shelf camera images |
| Output | Bounding boxes + item counts |
| Training Data | Custom shelf image dataset |
- Detects individual products on retail shelves
- Counts items per shelf zone using ROI (Region of Interest) extraction
- Feeds real-time stock count data into the forecasting pipeline
| Parameter | Value |
|---|---|
| Architecture | LSTM / Bidirectional LSTM |
| Input | Sequential stock level history |
| Output | Predicted future demand |
| Loss Function | Mean Absolute Error (MAE) |
| Test MAE | 0.0020 |
| Optimizer | Adam |
- Learns temporal patterns in stock depletion
- BiLSTM captures both forward and backward dependencies in demand patterns
- Outputs future demand values to trigger reorder alerts
| Metric | Value |
|---|---|
| MAE (Mean Absolute Error) | 0.0020 |
| Detection Accuracy | High precision on shelf items |
| Pipeline Scalability | Batch processing ready |
| Alert Lead Time | Configurable (hours / days ahead) |
π MAE of 0.0020 achieved on demand forecasting test set β indicating near-perfect stock prediction accuracy.
1. π· Capture shelf images (live camera / batch upload)
β
2. π YOLOv8 detects & counts products per shelf zone
β
3. π₯ Stock counts logged to time series database
β
4. π§ LSTM/BiLSTM forecasts next N-day demand
β
5. β οΈ Alert engine checks forecast vs. reorder threshold
β
6. π¦ Reorder recommendation generated automatically
This project was presented at:
ICNCS 2025 β International Conference on Networks and Communication Systems Venue: VIT Chennai Paper: IntelliStock β Predictive Refill & Smart Shelf Monitoring Author: PV Akhila
PV Akhila Data Scientist | AI & ML Researcher | Physics Background