Skip to content

tuananhne1110/Fire_Detection_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fire Detection System

Overview

The Fire Detection System is a comprehensive solution designed to detect fire through various sources, including images, videos, and real-time camera feeds. This system leverages advanced machine learning models to identify fire with high accuracy and provides a user-friendly interface for monitoring and detection.

Features

  1. Image and Video Detection
    • Upload images or videos to detect the presence of fire.
    • Visual indication of detected fire regions in the uploaded media.

ad879940-e717-4ddd-bb6d-4db11815a0cb

  1. Live Camera Detection
    • Real-time fire detection using live camera feeds.
    • Switch between IP cameras and Webcam for flexible monitoring.
    • Continuous monitoring with instant alerts on fire detection.
    • Email Notifications: When fire is detected in the live feed, an email notification with evidence (snapshot of the detected fire) is sent to the user's email.

709b8b5e-327c-425f-beea-0bccb97d2b40

Installation

To install and run the Fire Detection System, follow these steps:

**Prerequisites Python 3.8 or higher Virtual environment tools (optional but recommended) Required Python packages listed in 'requirements.txt'

**Steps

  1. Clone the Repository:

  2. Create and Activate Virtual Environment (Optional):

    • python -m venv venv
    • source venv/bin/activate # On Windows: venv\Scripts\activate
  3. Install Dependencies:

    • pip install -r requirements.txt
  4. Run the Application"

    • python app.py

Usage

  1. Image and Video Detection

    • Open the web application in your browser.
    • Navigate to the Image/Video Detection section.
    • Upload an image or video file.
    • The system will process the file and display the result with highlighted fire regions if detected.
  2. Live Camera Detection

    • Open the web application in your browser.
    • Navigate to the Live Camera Detection section.
    • Select the camera source (IP Camera or Webcam).
    • If using an IP Camera, enter the IP address and connect.
    • The system will start the live feed and begin detecting fire in real-time.
    • Switch between IP Camera and Webcam as needed.
    • If fire is detected in the live feed, an email notification with a snapshot of the fire will be sent to the configured email address.

bfaf2030-8d04-46ee-b450-eaf9c3c8a476

Email Notification Setup

To set up email notifications, update the config.py file with your email credentials and recipient address:

Email Configuration

  • email_flag = 0
  • smtp_port = 587
  • smtp_server = "smtp.example.com"
  • email_from = "[email protected]"
  • email_list = ["[email protected]"]
  • pswd = 'your_password'
  • subject = "mail_subject"
  • formatted_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published