Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Intelligent Smart Surveillance System

An AI-powered real-time surveillance system that integrates:

  • 🧍 Human detection
  • 🀸 Pose-based behavior analysis
  • πŸ”ͺ Hazardous object (weapon) detection
  • πŸƒ Speed and motion estimation

All combined into a live monitoring dashboard for intelligent surveillance.

This project demonstrates building a real-time AI system with backend integration and automated decision-making, aligned with production AI workflows.


πŸš€ Features

  • πŸŽ₯ Real-time video streaming (Webcam)

  • 🧍 Human detection using YOLOv8

  • 🀸 Pose estimation using MediaPipe

  • 🚨 Fall detection & abnormal behavior detection

  • πŸƒ Running / high-speed movement detection

  • πŸ”ͺ Hazardous object detection (knife, tools, etc.)

  • πŸ“ Speed estimation using motion tracking

  • πŸ“Š Live dashboard with alerts and system stats

  • πŸ”” Alert logging system

  • πŸ“ Data storage:

    • Pose sequences
    • Alerts
    • Reports

πŸ“Έ Demo Preview

🧠 Live AI Detection (Normal Activity)

Normal Activity


πŸƒ Behavior Detection (Running)

Running Detection


πŸ”ͺ Weapon Detection Alert

Weapon Detection


πŸ“Š System Statistics Dashboard

System Stats


⚠️ Weapon Detection Logs

Weapon Logs


🀸 Behavior Analysis Panel

Behavior Analysis


🚨 Security Alerts Panel

Security Alerts


🧠 Tech Stack

  • Python 3.10 (recommended via Anaconda)
  • Flask (Backend + API)
  • OpenCV (Video processing)
  • YOLOv8 (Ultralytics)
  • MediaPipe (Pose estimation)
  • NumPy, Pandas, Scikit-learn
  • HTML, CSS, JavaScript (Frontend)

πŸ“ Project Structure

EnhancedSmartSurveillance/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ object_detector.py
β”œβ”€β”€ speed_estimator.py
β”œβ”€β”€ label_generator.py
β”œβ”€β”€ knife.yaml
β”‚
β”œβ”€β”€ templates/
β”‚   └── index.html
β”‚
β”œβ”€β”€ static/
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ pose_sequences/
β”‚   β”œβ”€β”€ alerts/
β”‚   └── reports/
β”‚
β”œβ”€β”€ models/
β”‚
β”œβ”€β”€ requirements.txt
└── README.md

βš™οΈ Setup Instructions

1️⃣ Clone the Repository

git clone https://github.com/payaldongre/EnhancedSmartSurveillance.git
cd EnhancedSmartSurveillance

2️⃣ Create Environment

conda create --prefix ./env python=3.10
conda activate ./env

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Fix PyTorch Compatibility (IMPORTANT)

pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --extra-index-url https://download.pytorch.org/whl/cpu

▢️ Run the Project

# Navigate to project folder
cd EnhancedSmartSurveillance

# Activate environment
conda activate ./env

# Run application
python app.py

🌐 Access Dashboard

After running, open:

  • Local:
http://localhost:5000
  • Same network (optional):
http://<your-ip-address>:5000

Example:

http://192.168.1.5:5000

πŸ“‘ API Endpoints

Endpoint Description
/ Dashboard
/video_feed Live video stream
/api/stats System statistics
/api/alerts Alert logs
/api/weapon_detections Weapon alerts
/api/behavior_history Behavior tracking
/api/test_alert Trigger test alert
/api/clear_alerts Reset alerts

🎯 Detection Capabilities

🧍 Human Detection

  • YOLOv8-based detection

🀸 Behavior Analysis

  • Normal activity
  • Abnormal behavior
  • Running detection
  • Fall detection

πŸ”ͺ Hazard Detection

  • Detects:

    • Knife
    • Tools / objects
  • Triggers alerts when near a person

πŸƒ Speed Estimation

  • Motion tracking across frames

  • Based on:

    • Pixel displacement
    • Pose normalization
    • Temporal smoothing

⚠️ Important Notes

  • Python 3.10 recommended (avoid 3.13)
  • Webcam must be available
  • Close other apps using camera

πŸ‘‰ YOLO weights will be downloaded automatically on first run.


πŸ§ͺ Testing

  • Start the system and open dashboard

  • Try:

    • Fast movement β†’ running detection
    • Sudden fall β†’ fall detection
    • Object in hand β†’ weapon detection

πŸ“Œ Future Scope

  • ESP32-CAM integration
  • Multi-camera support
  • Cloud deployment
  • SMS / Email alerts
  • Database integration

πŸ‘©β€πŸ’» Contributors

  • Payal Dongre
  • Priyanka Jadhav

🏁 Summary

A real-time intelligent surveillance system combining:

  • Object detection
  • Pose estimation
  • Behavior analysis
  • Motion tracking

into a unified monitoring solution.


Note: Large files, model weights, and environment folders are excluded using .gitignore for efficient repository management.

About

AI-powered real-time smart surveillance system using YOLOv8 and MediaPipe for human detection, behavior analysis, and weapon detection.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages