FireSafe: Real-Time Fire and Person Detection with Automated Notification Alerting Using CCTV Surveillance Footage
FireSafe is a real-time mobile-first safety solution that detects fire and persons using live CCTV feeds. It leverages the lightweight YOLOv11n deep learning model trained on the D-Fire and Human datasets to provide efficient, accurate detections. When a fire or person is detected, users are instantly notified via mobile alerts and audible device beeps. The end-to-end pipeline consists of:
- A Flutter-based mobile app for viewing live feeds and alerts
- A Flask backend that processes CCTV RTSP streams in real-time
- Firebase Cloud Messaging (FCM) for sending notifications
- Live multi-camera feed monitoring
- Real-time fire and person detection
- Alert notifications via Firebase
- Secure user authentication and feed management
- Annotated live stream using MJPEG rendering
FireSafe/
├── backend/ # Flask backend for inference and streaming
│ ├── app.py # Main app with routes for inference
│ ├── background.py # Background thread for stream processing
│ ├── model/ # Trained YOLOv11n weights and inference utils
│ └── requirements.txt # Python dependencies
├── frontend/ # Flutter mobile app
│ ├── lib/ # Dart source code
│ ├── pubspec.yaml # Flutter dependencies
├── README.md # Project documentation
└── demo/ # Sample videos, screenshots, and results
- Install Flutter SDK.
- Connect a device or emulator.
- Navigate to the frontend folder and run:
cd frontend/
flutter clean
flutter pub get
flutter run
- Ensure Python 3.8+ is installed.
- Create a virtual environment (optional but recommended).
- Install backend dependencies and start the server:
cd backend/
pip install -r requirements.txt
python app.py
python background.py
Note: Inference runs on YOLOv11n using the Tapo TP-Link C212 camera RTSP stream.
- Launch the backend server first (
app.py
andbackground.py
). - Start the frontend Flutter app on your mobile device.
- Log in, add camera feeds, and view live detections in real-time.
- Notifications are automatically pushed when fire/person is detected with confidence above the set threshold.
Model | [email protected] | [email protected]:0.95 | Latency |
---|---|---|---|
YOLOv8n | 0.743 | 0.426 | 61 ms |
RTMDet-tiny | 0.754 | 0.435 | 57 ms |
YOLOv11n | 0.768 | 0.446 | 54 ms |
YOLOv11n outperformed all baselines in both detection accuracy and latency, making it ideal for real-time mobile deployment.
- D-Fire Dataset — Annotated real-world CCTV fire images
- Human Dataset — Person detection under diverse indoor and outdoor scenes
You can Watch our complete system in action: Demo Video on Google Drive