vision sytem for utopia industry cameras
 
 
Go to file
ahmedmujtaba-gif a8276a1b25 Server Push 0.3 2026-04-16 18:47:34 +05:00
templates Server Push 0.2 2026-04-16 17:52:18 +05:00
.gitignore refactor: replace block characters with standard ASCII in logs and add runs directory to gitignore 2026-04-10 12:39:31 +05:00
README.md Add README.md for Surveillance Dashboard 2026-04-01 12:55:22 +05:00
camera_stream.py Server Push 0.3 2026-04-16 18:47:34 +05:00
extract_dataset.py feat: implement adaptive video frame extraction pipeline with YOLO-based auto-labeling and checkpointing 2026-04-09 18:47:04 +05:00
pipeline_config.py feat: implement adaptive video frame extraction pipeline with YOLO-based auto-labeling and checkpointing 2026-04-09 18:47:04 +05:00
requirements.txt Update requirements.txt to reorder and clean up dependencies 2026-04-01 12:52:07 +05:00
run_pipeline.py refactor: replace block characters with standard ASCII in logs and add runs directory to gitignore 2026-04-10 12:39:31 +05:00
split_dataset.py feat: implement adaptive video frame extraction pipeline with YOLO-based auto-labeling and checkpointing 2026-04-09 18:47:04 +05:00
test_video.py feat: add test script for YOLO inference on surveillance video files 2026-04-10 12:45:44 +05:00
train_model.py feat: implement adaptive video frame extraction pipeline with YOLO-based auto-labeling and checkpointing 2026-04-09 18:47:04 +05:00

README.md

Surveillance Dashboard

Real-time multi-camera surveillance app with:

  • Person detection using Ultralytics YOLO
  • Group gathering detection (2+ people together)
  • Alert when group duration is over 20 seconds
  • Web dashboard with live feed, camera selector, and alert history
  • GPU-only inference (CUDA required)

Features

  • Switch between multiple cameras from UI
  • Draw person boxes and group timer overlays
  • Save alert snapshots to alerts/
  • Read camera credentials from .env

Project Structure

  • camera_stream.py - backend stream processing, detection, and API
  • templates/dashboard.html - dashboard UI
  • requirements.txt - minimal Python dependencies
  • .env - credentials and camera IPs
  • alerts/ - captured alert images

Requirements

  • Python 3.11+ (3.14 can work but ecosystem support may vary)
  • NVIDIA GPU + CUDA drivers
  • RTSP cameras reachable from this machine
  • Utopia VPN access to reach the camera network

Setup

Create and activate virtual environment:

python -m venv .venv
.\.venv\Scripts\Activate.ps1

Install PyTorch with CUDA (recommended command from PyTorch site):

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124

Install project dependencies:

pip install -r requirements.txt

Environment Variables

Create .env in project root:

username=YOUR_CAMERA_USERNAME
password=YOUR_CAMERA_PASSWORD
camera_ip_1=192.168.x.x
camera_ip_2=192.168.x.x

To add more cameras, add more camera_ip_* keys and update code list size if needed.

Run

.\.venv\Scripts\python camera_stream.py

Open:

Notes

  • App is configured to require CUDA GPU; it will exit if CUDA is not available.
  • Alert condition: at least 2 people in a group for 20+ seconds.
  • Alert snapshots are stored in alerts/.
  • Utopia VPN is required to access camera streams from outside the office network.
  • For VPN or camera network access, contact Samad (IT Department, Head Office).