sswadkar / hackalytics

A real-time flame detection algorithm combining Flask, OpenCV, and YOLOv5 to offer advanced fire monitoring and alerts. Flame AI integrates live video analysis, machine learning for accurate detection, and instant notification systems, enhancing emergency response across various environments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flame AI

Flame AI is an advanced early fire detection system designed to revolutionize safety protocols by leveraging cutting-edge technology. It swiftly notifies first responders and administrators of fire outbreaks, provides crucial data on surrounding populations for optimal resource allocation, and enables incredibly swift rescue operations.

rsz_demo

Inspiration

Inspired by a personal story of a team member affected by a factory fire, we delved into the limitations of existing smoke detectors. Our research highlighted the need for a system that not only detects fires early but also provides actionable data to responders, making Flame AI a necessary innovation in fire safety.

Features

  • Live Fire Detection: Real-time analysis of camera/video streams to detect fires.
  • Population Monitoring: Detects and reports the number of individuals in affected areas.
  • Multi-Camera Support: Monitors multiple camera views within a building for comprehensive coverage.
  • Instant Notifications: Sends alerts via Gmail and phone to designated administrators and first responders.
  • Intelligent Forecasting: Identifies regions at risk of fire using climate data.
  • Interactive Image Map: Offers real-time environmental metadata through an intuitive interface.

Use Cases

Flame AI serves first responders, industrial facilities, residential buildings, educational institutions, laboratories, and commercial spaces by providing early detection and crucial data for efficient emergency response and resource allocation.

How It’s Built

Directory Structure

  • flaskapp/: Contains the Flask app and files for training the linear regression model for fire detection.
  • imageprocessing/: Contains OpenCV and YOLOv5 models for image processing.

Running the Application

  • Flask App: Run the app (in flaskapp/) using python app.py on port 5001. requirements.txt is different for each folder, remember to create a venv and run it in that folder respectively.
  • Model Detection: For each model, use python detect.py --weights <file.pt> --source 0. Replace <file.pt> with fire.pt for the fire detection model and the appropriate file for the regular YOLOv5 model. requirements.txt is different for each folder, remember to create a venv and run it in that folder respectively.
  • Combining Data: Run python combine.py in parallel to monitor both models and combine their data using cv2 over a window.

Challenges

Developing Flame AI introduced us to challenges in computer vision, real-time video processing, and data acquisition. We navigated through learning PyTorch, optimizing video feed analysis, and integrating various technologies into a cohesive system.

Future Enhancements

We plan to integrate sensor data, detect flammable objects, and incorporate map location functionality, aiming to provide comprehensive fire safety solutions.

Links

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A real-time flame detection algorithm combining Flask, OpenCV, and YOLOv5 to offer advanced fire monitoring and alerts. Flame AI integrates live video analysis, machine learning for accurate detection, and instant notification systems, enhancing emergency response across various environments.

License:MIT License


Languages

Language:Jupyter Notebook 51.3%Language:HTML 33.1%Language:Python 12.8%Language:CSS 1.8%Language:JavaScript 1.0%