Skip to content

Astik97/FALCON

Repository files navigation

FALCON Banner

πŸ¦… FALCON

Automatic Crime Alert and Reporting System

Real-Time Weapon Detection using YOLOv8 β€’ Flask β€’ OpenCV β€’ Raspberry Pi β€’ Twilio

Python Flask YOLOv8 OpenCV SQLite Twilio License


πŸ“‘ Table of Contents

  • Overview
  • Problem Statement
  • Solution
  • Features
  • System Architecture
  • Technology Stack
  • Project Structure
  • Screenshots
  • Installation
  • Configuration
  • Running the Project
  • Workflow
  • Model Performance
  • Security
  • Limitations
  • Future Roadmap
  • Contributing
  • License
  • Author

πŸ“– Overview

FALCON is an AI-powered surveillance and emergency response platform that performs real-time weapon detection using a custom-trained YOLOv8 model. The system automatically identifies potential threats from live video streams, stores incident data, captures evidence, updates an interactive dashboard, and immediately notifies authorities through Twilio SMS alerts.

Designed as an end-to-end solution, FALCON combines computer vision, backend engineering, edge AI, and web technologies into a complete security platform suitable for educational demonstrations, research, and smart surveillance prototypes.


❗ Problem Statement

Traditional CCTV systems continuously record video but rely on human operators to identify threats, often delaying emergency response.

FALCON addresses this challenge by automatically detecting weapons in live video streams and triggering immediate alerts while maintaining searchable incident records.


πŸ’‘ Solution

The system continuously monitors live video feeds using YOLOv8.

When a weapon is detected:

  • Detects the object
  • Captures an image
  • Records the video clip
  • Stores incident details
  • Sends SMS alerts
  • Updates the dashboard
  • Generates detection reports

✨ Features

πŸ€– AI Detection

  • Real-time weapon detection
  • Custom YOLOv8 model
  • Live RTSP/IP Camera support
  • USB Camera support
  • Confidence-based detection

🚨 Alert System

  • Twilio SMS alerts
  • Detection history
  • Alert logs
  • Timestamp recording

πŸ“Š Dashboard

  • Incident analytics
  • Active alerts
  • Detection statistics
  • Weapon gallery
  • Interactive reports

πŸ‘€ Authentication

  • User Registration
  • Secure Login
  • Session Management

πŸ“ Reports

  • Detection reports
  • Captured Images
  • Video Evidence
  • Historical records

πŸ–₯ Edge AI

  • Raspberry Pi compatible
  • Lightweight deployment
  • Local inference support

πŸ— System Architecture

             Live Camera
                  β”‚
                  β–Ό
          YOLOv8 Detection
                  β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                    β–Ό
 Save Image & Video     Twilio SMS Alert
        β”‚                    β”‚
        β–Ό                    β–Ό
    SQLite Database      Emergency Contact
              β”‚
              β–Ό
      Flask Web Dashboard
              β”‚
              β–Ό
     Reports & Analytics

πŸ›  Technology Stack

Layer Technology
Programming Python
Backend Flask
Frontend HTML CSS JavaScript
Computer Vision OpenCV
AI Model YOLOv8
Database SQLite
Alerts Twilio API
Deployment Raspberry Pi
Version Control Git & GitHub

πŸ“‚ Project Structure

FALCON/
β”‚
β”œβ”€β”€ screenshots/
β”œβ”€β”€ static/
β”œβ”€β”€ templates/
β”œβ”€β”€ train_detect_weapons/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ yolo_detect.py
β”œβ”€β”€ live_rtsp_detector.py
β”œβ”€β”€ train_yolo.py
β”œβ”€β”€ twilio_alert.py
β”œβ”€β”€ database.py
β”œβ”€β”€ alert_db.py
β”‚
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
└── README.md

Screenshots

Login

Login

Register

Register

Dashboard

Dashboard

Detection Report

Report

Alert

Alert


βš™ Installation

git clone https://github.com/Astik97/FALCON.git

cd FALCON

Create virtual environment

python -m venv venv

Windows

venv\Scripts\activate

Linux

source venv/bin/activate

Install dependencies

pip install -r requirements.txt

πŸ” Environment Variables

Create a .env file.

TWILIO_ACCOUNT_SID=

TWILIO_AUTH_TOKEN=

TWILIO_PHONE=

SECRET_KEY=

β–Ά Running the Project

python app.py

Open

http://127.0.0.1:5000

πŸ”„ Workflow

Start Camera

↓

YOLOv8 Detection

↓

Weapon Detected

↓

Capture Evidence

↓

Store in Database

↓

SMS Alert

↓

Dashboard Update

↓

Generate Report

πŸ“ˆ Model Performance

Metric Value
Model YOLOv8
Dataset 9,633 Images
Epochs 50
Precision 85%
Recall 75%
mAP@0.5 81%

⚑ Performance Benchmark

Device FPS Latency
GPU 15–25 40–60 ms
CPU 5–10 120–200 ms
Raspberry Pi 1–3 400–800 ms

πŸ”’ Security

  • Environment variables for secrets
  • .gitignore excludes credentials
  • Secure authentication
  • Session management
  • No API keys committed

⚠ Limitations

  • Reduced accuracy in poor lighting
  • False positives possible
  • Raspberry Pi has limited inference speed
  • Stable network required for RTSP

πŸ—Ί Future Roadmap

  • Docker Support
  • PostgreSQL Migration
  • Multi-camera Monitoring
  • Email Alerts
  • Push Notifications
  • Cloud Deployment
  • ONNX/TensorRT Optimization
  • Mobile Dashboard
  • Face Recognition Module

🀝 Contributing

Contributions, issues, and feature requests are welcome.

Fork the repository.

Create a feature branch.

Commit your changes.

Open a Pull Request.


πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Astik Mohapatra

Backend Developer β€’ AI Systems Developer β€’ Computer Vision Enthusiast

πŸ“§ Email: astikm7007@gmail.com

πŸ”— LinkedIn

https://linkedin.com/in/astik-mohapatra

πŸ™ GitHub

https://github.com/Astik97


⭐ Support

If you found this project helpful,

⭐ Star the repository

🍴 Fork it

πŸ“’ Share it

Happy Coding πŸš€

About

Edge AI Crime Detection and Emergency Alert System using YOLOv8, Flask, Raspberry Pi and Twilio APIs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors