<<<<<<< HEAD
This project detects forest fires using Convolutional Neural Networks (CNN) and performs real-time fire detection via a mobile camera. It can optionally send email alerts when fire is detected and includes geolocation information.
Forest-Fire-Detection-AI/
βββ model_training/
β βββ Forest_Fire_Detection_Train_Test_model.ipynb # CNN model training notebook (Google Colab)
βββ live_detection/
β βββ fire_detection_live.py # Real-time fire detection using webcam
βββ requirements.txt # Python package dependencies
βββ README.md # Project overview and usage
βββ .gitignore # Files to ignore in GitHub
- Model: Custom CNN
- Input size: 224x224 pixels RGB
- Output: Binary classification (Fire / No Fire)
Run Forest_Fire_Detection_Train_Test_model
in Google Colab to train the model on fire and non-fire images. You can save the model as .keras
.
This project also supports using a mobile phone as a webcam using the IP Webcam app (Android):
- Install the IP Webcam app from the Play Store.
- Connect your mobile and laptop to the same Wi-Fi or mobile hotspot.
- Open the app, scroll down, and tap "Start Server".
- Note the streaming URL (e.g.,
http://192.168.0.101:8080/video
). - In
fire_detection_live.py
, replace the webcam line:
cap = cv2.VideoCapture("http://192.168.0.101:8080/video")
### πΉ 3. Real-Time Detection (VS Code or Local Python)
Use `nforest_fire_detection.py` to detect fire from your mobile camera.
```bash
python nforest_fire_detection.py
Press q
to quit the webcam stream.
To use the real-time fire detection without training, download the pre-trained model from the link below:
π Download fire_model.keras
Place the downloaded file in the project folder before running live_detection.py
.
pip install -r requirements.txt
- Forest Fire Dataset (Kaggle)
- You can also use your own dataset with two folders:
Fire/
andNon-Fire/
- TensorFlow 2.x
- OpenCV
- NumPy
- Matplotlib
(Install via requirements.txt
)
- Don't upload large datasets to GitHub. Use links instead.
- Store sensitive credentials (like email passwords) securely.
VENKAT RAMANAN R
B.Tech ECE, VIT-AP University
Edunet-Microsoft AI Internship Project
π₯ AI-based forest fire detection system using CNN and real-time webcam monitoring with email alerts
9d1a01909a67ae67aa827c7eb83bf5252d045441