- Background on Wildfires π
- Project Overview π
- Features π
- Screenshot πΈ
- Installation π οΈ
- Usage π»
- File Structure π
- Requirements π¦
- Improvements β¨
- Contributing π€
- License π
Wildfires pose a significant environmental and economic threat worldwide. Their frequency and intensity have been escalating due to various factors, particularly climate change.
- Global Impact: Wildfires have caused devastating damage across various regions, from the Amazon Rainforest to Australia. In 2020, wildfires in California alone burned over 4.2 million acresγCal Fireγ.
- Frequency: Over 100,000 wildfires occur annually in the U.S. aloneγNational Geographicγ.
- Economic Impact: Wildfires cause an estimated 5γγ« billion in damage annually in the U.S.γInsurance Information Instituteγ.
- Climate Change: Rising global temperatures and drier conditions are significantly increasing the risk and severity of wildfiresγNASAγ.
These alarming statistics underscore the urgent need for efficient wildfire detection and monitoring systems. Our Wildfire Detection System aims to address this need by leveraging cutting-edge technology to provide early detection and alerts, potentially saving lives and reducing damage.
This project presents an innovative solution combining satellite imagery, camera feeds, and weather data to predict the risk of wildfires. Using advanced deep learning techniques, our system performs accurate predictions and provides timely alerts through a user-friendly Flask application.
Our models include:
- Satellite Classification CNN: Using ResNet50v2, this model detects wildfire probabilities from satellite images with an accuracy of 97%.
- Image Classification CNN: Also based on ResNet50v2, this model identifies fires in uploaded images with an accuracy of 98%.
- Weather Data Model: This model predicts wildfire risks from meteorological data with an accuracy of 100%, albeit on a limited dataset.
- Satellite Detection: Detect wildfires using high-resolution satellite imagery.
- Camera Detection: Identify wildfire outbreaks through analysis of images from cameras or drones.
- Weather Prediction: Predict wildfire risks based on current and forecasted weather conditions.
- Alert System: Receive hourly email alerts about wildfire risks in specified locations.
Here's a glimpse of the Wildfire Detection System interface:
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/ZephyrusBlaze/Wildfire-Detection cd Wildfire-Detection -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
Make sure to run the Jupyter notebooks for model training and saving on Kaggle:
- Open
wildfire-camera-detection.ipynbandwildfire-satellite-detection.ipynbin Kaggle Notebooks to train and save the respective models.
- Open
-
Set up environment variables: Create a
.envfile and add your Mapbox token and other necessary configurations:MAPBOX_TOKEN=your_mapbox_token MAILERSEND_KEY=your_mailersend_key
-
Initialize the database:
python -c 'from src.app import init_db; init_db()' -
Run the application:
python src/app.py
Once the application is running, navigate to the homepage to explore the features:
- Home: Overview and introduction to the system.
- Camera Detection: Upload images for wildfire detection.
- Satellite Detection: Analyze satellite data for wildfire hotspots.
- Alert Service: Subscribe for wildfire alerts for specific geographic areas.
. βββ LICENSE # Project license βββ README.md # You're here! βββ alerts.db # Database file for alerts βββ requirements.txt # List of dependencies βββ analysis # Analysis and model files β βββ meteorological-detection-classification.ipynb # Notebook for weather-based detection β βββ wildfire-camera-detection.ipynb # Notebook for camera image detection β βββ wildfire-satellite-detection.ipynb # Notebook for satellite image detection β βββ meteorological-detection-classification.keras # Saved weather detection model β βββ std_scaler_weather.pkl # Scaler for weather data β βββ wildfire_camera_detection_model.keras # Saved camera detection model β βββ wildfire_satellite_detection_model.keras # Saved satellite detection model βββ src # Source code directory β βββ app.py # Main application file β βββ camera_functions.py # Functions for camera image processing β βββ email_alert.py # Functions for sending email alerts β βββ meteorological_functions.py # Functions for weather data processing β βββ satellite_functions.py # Functions for satellite image processing β βββ static # Static files (JS, images) β β βββ js # JavaScript files β β β βββ alert_map.js # JS for alert map β β β βββ camera.js # JS for camera detection page β β β βββ map.js # JS for satellite detection map β β βββ images # Image files β β β βββ Screenshot.png # Screenshot of the application β βββ templates # HTML templates β βββ alert.html # Template for alert page β βββ base.html # Base template β βββ detect_camera.html # Template for camera detection page β βββ detect_satellite.html # Template for satellite detection page β βββ home.html # Template for homepage
- Python 3.10.13
- Flask 3.0.3
- TensorFlow 2.16.1
- Pandas 2.2.2
- Scikit-Learn 1.5.0
- Mailersend 0.5.6
- OpenMeteo SDK 1.11.7
For the full list of dependencies, see the requirements.txt file.
Future enhancements could further improve the effectiveness of the Wildfire Detection System:
- Diverse Datasets: Integrating datasets from various regions would improve the systemβs global applicability.
- Data Quantity and Quality: Expanding the amount and quality of training data can enhance model accuracy.
- Advanced Algorithms: Implementing more sophisticated machine learning algorithms could improve detection precision.
- Real-Time Processing: Enhancing the system to process data in real-time would provide faster alerts and responses.
- User Interface: Improving the UI/UX for easier navigation and interaction.
We welcome contributions from the community! Please read our Contributing Guidelines to get started. Hereβs how you can contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit them (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a Pull Request (PR) using our PR Template.
For reporting bugs or suggesting features, please use our Issue Templates.
This project is licensed under the Apache 2.0 License. See the LICENSE file for more information.