โโโโโโโ โโโโโโ โโโ โโโโโโโโโโโโโโ โโโ โโโโโโ โโโ โโโ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ โโโโโโ โโโโโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโ
โโโ โโโโโโ โโโโโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโ
Turning passive surveillance into proactive protection.
An edge-optimized AI perception platform that sees threats before they escalate.
Rakshak (Sanskrit: เคฐเคเฅเคทเค, "protector") is an autonomous, edge-first AI surveillance platform that goes far beyond conventional CCTV. Rather than passively recording footage, Rakshak actively interprets the scene โ understanding human intent, detecting physical dangers, and triggering emergency responses in real time.
Built for a world where every second of delay costs lives, Rakshak eliminates the bottleneck of human monitoring through a multi-model AI perception stack that runs at the edge with sub-second latency.
๐ Developed and deployed for HACKACHINO 4.0.
| Module | Technology | What It Does |
|---|---|---|
| ๐ฅ Violence Detection | YOLOv8 (custom-trained) | Identifies physical altercations โ punching, kicking, fighting โ in real time |
| ๐ง Fall & Health Monitor | MediaPipe Pose | Detects sudden collapses, fainting, and health emergencies via skeletal estimation |
| ๐จ Proximity Harassment | Spatial Heuristics | Flags suspicious physical closeness and potential harassment scenarios |
| ๐ฅ Fire & Smoke Analytics | Dedicated Vision Node | Identifies smoke plumes and open flames with high-confidence alerting |
| Feature | Description |
|---|---|
| ๐ Tactical Dashboard | High-performance Next.js 14 dashboard with real-time multi-camera grid synchronization |
| ๐บ๏ธ Spatial Intelligence | Predictive risk density maps visualizing threat hot-spots and incident concentration |
| ๐ EOC Command Mode | Dedicated Emergency Operations Center view for high-stakes incident management |
| ๐ก Integrated Dispatch | One-click dispatch for Police, Fire & EMS with real-time incident telemetry |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RAKSHAK PLATFORM โ
โ โ
๐ท Camera Feeds โโโบ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ โ
โ โ AI ENGINE โ โ COMMAND CENTER โ โ
๐ท RTSP Streams โโโบ โ โ โ WS โ โ โ โโโ ๐ฎ Operator
โ โ YOLOv8 โโโโโโบโ Next.js 14 โ โ
๐ท IP Cameras โโโบ โ โ MediaPipe โ โ Dashboard โ โ
โ โ OpenCV โ โ EOC Mode โ โ
โ โโโโโโโฌโโโโโโโโ โโโโโโโโโโโฌโโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโ โ
โ โ FastAPI Backend โ โ
โ โ SQLAlchemy ยท LiteLLM ยท WebSockets โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ EMERGENCY DISPATCH โ
โ ๐ Police ๐ Fire โ
โ ๐ EMS Integrated โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
Rakshak/
โ
โโโ ๐ backend/ # FastAPI core, AI models & APIs
โ โโโ app/ # Application logic & routing
โ โโโ models/ # Model weight references
โ
โโโ ๐ frontend/ # Next.js 14 tactical dashboard
โ โโโ src/ # Application source code
โ โโโ public/ # Static assets & project logos
โ
โโโ ๐ models/ # Shared model weights
โ โโโ best.pt # Violence detection model
โ โโโ fire.pt # Fire & smoke detection model
โ
โโโ ๐ scripts/ # Database seeding & model utilities
โโโ ๐ docs/ # Documentation & diagrams
โโโ ๐ scratch/ # Experimental notebooks
โ
โโโ ๐ Voilence.ipynb # Violence detection training notebook
โโโ โ๏ธ yolov8n.pt # Base YOLOv8 nano weights
โโโ ๐ README.md
Make sure you have the following installed:
- Python 3.10+
- Node.js 18+ and npm
- Git
git clone https://github.com/Awesome06/Rakshak.git
cd Rakshak# Navigate to backend
cd backend
# Create and activate virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start the FastAPI server
python -m uvicorn app.main:app --reload๐ Backend will be live at
http://localhost:8000
๐ API docs available athttp://localhost:8000/docs
# In a new terminal, navigate to frontend
cd frontend
# Install dependencies
npm install
# Start the development server
npm run dev๐ Dashboard will be live at
http://localhost:3000
Create a .env file inside the backend/ directory:
# Required
GEMMA_API_KEY=your_gemma_api_key_here
# Optional (defaults shown)
DATABASE_URL=sqlite:///./rakshak.db
WEBSOCKET_HOST=0.0.0.0
WEBSOCKET_PORT=8001| Model File | Purpose | Format |
|---|---|---|
yolov8n.pt |
Base object detection (nano) | PyTorch |
models/best.pt |
Custom violence detection | PyTorch |
models/fire.pt |
Fire & smoke detection | PyTorch |
๐ก Model weights larger than 100MB are excluded from the repo. Use the download script:
python scripts/download_models.py
Once the backend is running, explore the full interactive API at:
http://localhost:8000/docs โ Swagger UI
http://localhost:8000/redoc โ ReDoc
Key endpoints include:
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/cameras |
List all registered camera feeds |
POST |
/api/v1/cameras |
Register a new camera |
GET |
/api/v1/incidents |
Retrieve all detected incidents |
GET |
/api/v1/incidents/{id} |
Get incident detail with telemetry |
POST |
/api/v1/dispatch |
Trigger emergency dispatch |
WS |
/ws/stream/{cam_id} |
Real-time video inference stream |
WS |
/ws/alerts |
Live alert notification channel |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MODEL METRICS (Validation) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโค
โ Module โ mAP@0.5 โ FPS โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโค
โ Violence Detection โ 0.87 โ 28+ โ
โ Fire & Smoke โ 0.91 โ 30+ โ
โ Pose (Fall) โ 0.93 โ 25+ โ
โ Proximity Heuristicโ โ โ Real-time โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโ
- Violence detection with YOLOv8
- Fall & health monitoring via MediaPipe
- Fire & smoke vision node
- Real-time Next.js tactical dashboard
- WebSocket-based telemetry streaming
- EOC Command Mode
- One-click emergency dispatch integration
- Multi-camera PTZ auto-tracking
- Mobile EOC companion app
- Federated edge node mesh network
- On-device inference (Jetson Nano / RPi 5)
- Incident report auto-generation via LLM
Contributions are welcome! Here's how to get started:
# Fork the repo, then:
git checkout -b feature/your-feature-name
git commit -m "feat: add your feature"
git push origin feature/your-feature-name
# Open a Pull Request ๐Please follow Conventional Commits for commit messages.
This project is licensed under the MIT License โ see the LICENSE file for details.
- Ultralytics YOLOv8 โ for the world-class detection backbone
- Google MediaPipe โ for blazing-fast pose estimation
- FastAPI โ for the elegant async API framework
- Vercel / Next.js โ for the production-grade frontend toolkit
- HACKACHINO 4.0 โ for the stage to build something that matters