FireFlAI is an advanced forest fire assistance platform designed to help authorities track active fires, potential fire areas, fire spread trajectories, nearby settlements and water resources, and where help should be dispatched. The platform actively operates in Turkey between latitudes 35°48'N and 42°06'N and longitudes 25°39'E and 44°49'E.
A helper tool for forest fires in which our modules do the following:
- Predict fire risks for over 1,000 points across Turkey and view the ones with higher risks on a map.
- Analyze video feeds sent from drones monitoring risky locations to detect smoke or active fires.
- Predict where a fire will spread based on the meteorological and geographical conditions of the area.
- Mark nearby settlements and water resources and generate a dispatch plan for nearby fire crews based on this data.
Demo: https://www.youtube.com/watch?v=9537oFO4m2I
- Meteorological Risk Engine (Risk Model): Calculates percentage-based risk scores (Low, Medium, High Risk) and sorts locations using an XGBoost model analyzing 27 parameters including real-time weather, topographical data, vegetation, and NASA FIRMS VIIRS/MODIS satellite data. Hourly background tasks update risk grids via APScheduler.
- Fire Detection Engine (Detect Model): Computer vision system using PyTorch, OpenCV, and YOLO (Ultralytics) to scan incoming imagery/video frames for smoke or flames and record detections.
- Spread Prediction Engine (Spread Model): Generative AI forecasting engine utilizing a Transformer-based model fine-tuned with LoRA (Low-Rank Adaptation) and Amazon SageMaker to predict fire trajectory and output a WKT Polygon.
- Tactical Dispatch Engine (Dispatch Model): Automated incident commander powered by Amazon Bedrock using Large Language Models to synthesize predicted fire paths and resource inventories into natural-language tactical command orders.
- Framework: Layered RESTful API built with Python and FastAPI, following a Controller-Service-Repository pattern (Routers -> Services -> DB Models).
- Database & ORM: Relational database (PostgreSQL) using SQLAlchemy ORM with PostGIS/GeoAlchemy2 geospatial extensions.
- ML & Infrastructure Stack: Amazon RDS (PostgreSQL), Amazon Bedrock, Amazon SageMaker, AWS ECS, AWS S3, PyTorch, Transformers, PEFT, Accelerate, BitsAndBytes, Scikit-Learn, XGBoost, and APScheduler.
- Core Framework: Single Page Application (SPA) built with React 19, TypeScript, JavaScript, and Vite.
- Styling & Visualization: Tailwind CSS and Google Maps API for real-time geospatial visualization.
- Detection Router (
/api/v1/detection): Handles incoming image/video frames, triggers the YOLO model, and inserts records intofire_detections. - Risk Router (
/api/v1/risk): Serves cached risk grids generated by XGBoost for map heatmaps. - Spread Router (
/api/v1/spread): Accepts a detection ID, triggers the spatial LLM/LoRA model, and returns a WKT Polygon of the predicted spread area. - Dispatch Router (
/api/v1/dispatch): Generates tactical dispatch orders based on active detection and predicted spread.
Follow these steps to run the project locally:
-
Clone the repository:
git clone https://github.com/silabzkrt/FireflAI
cd FireflAI -
Backend Setup:
cd backend
uvicorn main:app --reload --port 8000 -
Frontend Setup:
cd frontend
npm install
npm run dev
- Ali İhsan Sevindi
- Elif Bozkurt
- Sıla Bozkurt
- Kürşat Çakır
