Firefly is a comprehensive system designed for real-time fire and smoke detection. Leveraging machine learning, a robust API, and a user-friendly frontend, Firefly provides timely alerts to ensure safety and prevent potential disasters.
- Real-time Video Analysis: Continuously monitors video streams for signs of fire and smoke.
- Advanced Machine Learning: Employs the VGG16 model for accurate and efficient detection.
- Scalable API: Built with FastAPI for high performance and easy integration.
- Persistent Data Storage: Utilizes MongoDB Atlas for secure and reliable data management.
- User Authentication: Secure user registration and login functionality.
- Email Alerts: Automated email notifications upon detection of fire or smoke.
- Intuitive Frontend: User-friendly interface for monitoring and managing the system.
- Alert Logging: Detailed logs of detection events for analysis and review.
Firefly/ (Root)
│
├── src/
│ ├── fire_detection_backend/ (Node.js Backend)
│ │ ├── server.js
│ │ ├── ... (other backend files)
│ │ ├── models/
│ │ │ ├── Session.js
│ │ │ ├── User.js
│ │ │ ├── video.js
│ │ ├── userRoutes.js
│ │ ├── fireAlarm.js (Optional)
│ │ ├── .env
│ │ └── package.json
│ │
│ ├── api/ (FastAPI Python API)
│ │ ├── api.py
│ │ ├── fs_model_v2.pkl (ML Model)
│ │ └── ... (other API files)
│ │
│ └── fire_detection_frontend/ (Frontend)
│ ├── index.html
│ ├── script.js
│ ├── style.css
│ └── ... (other frontend assets)
│
├── README.md
├── LICENSE
└── ... (other project files)
- Machine Learning: TensorFlow, Keras, VGG16, Pickle
- API: FastAPI (Python), Uvicorn, HTTPX
- Backend: Node.js, Express, Mongoose, JWT, Bcrypt, Nodemailer, Sharp
- Database: MongoDB Atlas
- Frontend: HTML, CSS, JavaScript
- Other: CORS, Dotenv, Axios
-
Clone the Repository:
git clone [https://github.com/sgindeed/Firefly.git](https://github.com/sgindeed/Firefly.git) cd Firefly -
Backend Setup (Node.js):
-
Navigate to the
src/fire_detection_backenddirectory.cd src/fire_detection_backend -
Install dependencies:
npm install
-
Create a
.envfile and configure your environment variables (e.g.,MONGO_URI,JWT_SECRET,EMAIL_USER,EMAIL_PASS). -
Start the backend server:
npm start
-
-
API Setup (Python):
-
Navigate to the
src/apidirectory.cd ../api -
(Optional but Recommended) Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Linux/macOS # venv\Scripts\activate # On Windows
-
Install dependencies:
pip install -r requirements.txt pip install fastapi uvicorn tensorflow keras pillow httpx
-
Run the API:
uvicorn api:app --reload --port 8001
-
-
Frontend Setup:
-
Navigate to the
src/fire_detection_frontenddirectory.cd ../fire_detection_frontend -
Open
index.htmlin your browser.
-
We welcome contributions to Firefly! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request.
A huge thank you to our dedicated team of developers:
- Supratim Ghosh: 🔥 Smoke and Fire Detection using ML (VGG16 Model)
- Suvojit Adak: 🐍 FastAPI Python API Development
- Mahak Gupta: 💾 MongoDB Atlas Database Integration & Node.js Backend
- Anushka Adak: 🎨 Frontend Development (HTML, CSS, JS) & 🔍 Project Research
- Aishee Guha Biswas: 💻 Frontend Development
This project is licensed under the MIT License.
- We extend our gratitude to the open-source community for providing the tools and libraries that made this project possible.
- Special thanks to the kaggle, TensorFlow, Keras, FastAPI, Node.js, and MongoDB communities.
For any inquiries or feedback, please feel free to reach out to the contributors through their GitHub usernames:
- Supratim Ghosh: sgindeed
- Suvojit Adak: SuojitAdak01
- Mahak Gupta: Mahak-27
- Anushka Adak: anushkaadak
- Aishee Guha Biswas: Aishee06