Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ Aegis Eye — Real-time Autonomous Accident Detection & Monitoring System

License: MIT Python Node.js React Vite PyTorch YOLOv8

Aegis Eye is a full-stack, production-grade Computer Vision and Deep Learning solution designed to monitor traffic streams in real time. It detects vehicle collisions, identifies helmet violations, calculates confidence scores, and alerts responders through an interactive React dashboard with WebSocket streaming.


📸 Key Features

  • ⚡ Real-Time Collision & Helmet Detection: Dual pipeline leveraging YOLOv8 for spatial object detection & ResNet18 + Attentive LSTM for temporal sequence analysis.
  • 🔄 Live WebSocket Video Streaming: Frame-by-frame processing with bounding box overlays streamed directly to the dashboard over WebSockets.
  • 🗺️ DIGIPIN & Geospatial Mapping: Automatic coordinate mapping and DIGIPIN spatial indexing for rapid emergency dispatch location tracking.
  • 📊 Telemetry & Analytics Dashboard: Sleek React UI with real-time graphs, incident history logs, snapshot capture, and alert notifications.
  • 📁 Multi-Source Video Processing: Support for live webcam streams, uploaded video files (.mp4, .avi), RTSP streams, and pre-loaded sample datasets.

🏗️ System Architecture

graph TD
    A[Camera Stream / MP4 / RTSP] -->|Frame Ingestion| B[Python Worker Service]
    B -->|Object Bounding Boxes| C[YOLOv8 Detection Engine]
    B -->|Temporal Feature Aggregation| D[ResNet18 + LSTM Model]
    C --> E[Inference Engine & Telemetry Compiler]
    D --> E
    E -->|JSON + Base64 Frames| F[Node.js Express + WS Gateway]
    F -->|WebSocket Push| G[React + Vite Frontend Dashboard]
    E -->|Incident Logging & Snapshots| H[(SQLite Database)]
Loading

🛠️ Technology Stack

Layer Technologies & Tools
Frontend React 18, Vite, Lucide Icons, Custom Design Tokens
Backend Gateway Node.js, Express.js, WebSockets (ws), Multer
AI / Machine Learning Python 3.9+, PyTorch, Ultralytics YOLOv8, OpenCV, Scikit-Learn
Database & Utilities SQLite3, Pandas, NumPy, DIGIPIN Helper Utilities

🚀 Quick Start Guide

1. Prerequisites

Ensure you have the following installed:

  • Node.js: v18.0.0 or higher
  • Python: v3.9 to v3.11
  • Git: Latest version

2. Clone the Repository

git clone https://github.com/your-username/accident_detection_System.git
cd accident_detection_System

3. Setup Python Virtual Environment & AI Dependencies

cd accident_detection

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On Linux / macOS:
source venv/bin/activate

# Install Python requirements
pip install -r requirements.txt

4. Setup Node.js Backend Server

Open a new terminal window:

cd accident_detection/backend
npm install

(Optional) Copy .env.example to .env:

cp .env.example .env

5. Setup React Frontend Dashboard

Open a third terminal window:

cd accident_detection/frontend
npm install

🏃 Running the Application

Step 1: Launch Backend Server

In the accident_detection/backend directory:

npm run dev

Server runs at http://localhost:8000 (WebSocket endpoint at ws://localhost:8000/ws).

Step 2: Launch Frontend Dashboard

In the accident_detection/frontend directory:

npm run dev

Open your browser at http://localhost:5173.


📂 Project Structure

accident_detection_System/
├── accident_detection/
│   ├── backend/               # Express + WS Backend Server
│   │   ├── database/          # SQLite schema & loggers
│   │   ├── services/          # Streaming workers & detection services
│   │   ├── utils/             # Config & DIGIPIN location helpers
│   │   ├── server.js          # Main Express server entry point
│   │   └── package.json
│   ├── frontend/              # React 18 + Vite Web Dashboard
│   │   ├── src/               # React components & UI state
│   │   ├── vite.config.js
│   │   └── package.json
│   ├── models/                # Pre-trained YOLOv8 & LSTM weights
│   ├── logs/                  # Output snapshots & incident logs
│   ├── requirements.txt       # Python ML dependencies
│   └── README.md
├── data/                      # Sample benchmark videos
├── LICENSE                    # MIT Open Source License
└── README.md                  # Main Repository Documentation

📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages