An industrial-grade computer vision solution for automated workstation occupancy analytics and productivity auditing, optimized for Intel hardware.
Vision Activity Analytics (VAA) transforms raw surveillance footage into actionable behavioral insights. The system effectively mitigates Re-Identification (Re-ID) challenges common in traditional trackers by implementing Seat-Based Spatial Logic. Engineered for edge computing, it leverages OpenVINO to ensure high-throughput execution on commodity Intel CPUs.
Environment: Tested on Intel Core i-series (OpenVINO Integrated)
| Metric | Live AI (Streaming) | Batch Processing (Offline) | Status |
|---|---|---|---|
| Inference Latency | 71.24 ms | 60.88 ms | Sustained |
| Throughput | 13.6 FPS | 19.0 FPS | Near Real-time |
| CPU Utilization | 56.7 % | 78.4 % | High Efficiency |
Technical Insight: Leveraging JIT (Just-In-Time) compilation and model warming, cold-start latency was reduced from 501.33ms to 66.63ms (an 86% improvement).
- Spatial Seat-Locking: Instead of relying on volatile visual descriptors, the system anchors identities to static polygonal workstation coordinates.
- Anchor Point Heuristics: Utilizes an optimized anchor at 25% of the bounding box height for
pointPolygonTestoperations, bypassing desk-level occlusions. - Anti-Merging Filters: Implements dual-criteria filtering (Area > 22,000px & Aspect Ratio > 0.7) to prevent "box-merging" in crowded office perspectives.
- Dual-Mode Architecture: Features bandwidth-optimized Live Preview and throughput-optimized Turbo Batch Export.
- H.264 Web Transcoding: Automated pipeline using FFmpeg to transcode results for native, cross-browser HTML5 playback.
- Industrial Deployment: Powered by Waitress WSGI to ensure robust concurrency and production-level stability.
- Core: YOLOv8, OpenVINO™ Toolkit.
- Backend: Python, Flask, Waitress WSGI.
- Processing: OpenCV, NumPy, Pandas, MoviePy.
- Storage: SQLite (Event Logging) & Excel (Automated HR Reporting).
vision-activity-analytics/
├── assets/images/ # Project demonstrations (GIFs/Images)
├── data/ # Local database, zones config, and samples
├── models/ # AI weights (YOLO, OpenVINO)
├── scripts/ # Utility scripts (Export, Draw Zones, Setup)
├── src/ # Core logic (Inference, Database, Camera)
├── static/ # Frontend assets (CSS, JS)
├── templates/ # Web UI templates (HTML)
├── app.py # Main entry point
├── config.py # Global system configurations
├── requirements.txt # Project dependencies
└── run_system.bat # Windows automation script (Setup & Launch)
For the most convenient experience on Windows, a dedicated automation script is provided. This script manages the virtual environment, installs dependencies, and warms up the AI engine automatically.
- Run the Script: Double-click
run_system.batfrom the root directory. - Automated Process:
- Environment Check: Automatically creates a
.venvif it doesn't exist. - Dependency Sync: Installs/updates required libraries quietly.
- OpenVINO Warming: Prepares the AI Engine for optimal inference.
- Auto-Launch: Automatically opens the Dashboard in your default browser at
http://127.0.0.1:5000.
Note: Please allow 15-20 seconds for the AI Engine to initialize during the first run.
- Python 3.9+
- FFmpeg installed on system path
- Intel CPU (Recommended for OpenVINO™ hardware acceleration)
# Clone the repository
git clone https://github.com/Montero52/vision-activity-analytics.git
cd vision-activity-analytics
# Setup Virtual Environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install Dependencies
pip install -r requirements.txtInstead of downloading heavy weights manually, run the following script to download the YOLOv8n model and export it to the optimized OpenVINO™ format:
python scripts/export_model.pyThis script will generate the optimized model files in the models/yolov8n_openvino_model/ directory.
# Define your monitoring zones (Polygonal)
python scripts/draw_zones.py
# Launch the Dashboard
python app.pyThis project is licensed under the MIT License. It is free to use for academic and personal purposes. See the LICENSE file for the full license text.
Trần Nhật Quý Computer Science Student | Duy Tan University | LinkedIn | GitHub | trannhatquy0@gmail.com
