Skip to content

osnaren/forest-fire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forest Fire Intelligence Suite

Live Demo Legacy Demo Dataset License

AI-powered wildfire detection across modern (v2) and legacy (v1) web experiences. Upload an image, receive instant predictions, or integrate the rate-limited API into your tools.


Contents

  1. Project Overview
  2. Model & Dataset
  3. Quick Start
  4. Repository Structure
  5. Roadmap
  6. Community
  7. License

Project Overview

Project Description Highlights
v2/ Next.js 16 application with privacy-first client-side inference. Modern UI, Client-side TensorFlow.js, /api/predict fallback, rate limiting, content configs, Zustand state management.
v1/ Original Teachable Machine prototype preserved for posterity. Runs fully in the browser with TensorFlow.js. No backend dependency, animated results dashboard, legacy design.
docs/ Planning notes and research artifacts. Project planning context and historical insights.

Model & Dataset

  • Dataset: Forest Fire C4 (Kaggle)
    • Licensed under CC BY-NC-SA 4.0. You may reuse and remix the dataset for non-commercial research with attribution and share-alike terms.
    • Curated across Fire, Smoke, Smoke+Fire, and No Fire classes.
  • Model: MobileNet variant distilled for 224×224 image inputs.
    • Preprocessing: resize, center-crop, normalize to [-1, 1].
    • Shared between the browser bundle (@tensorflow/tfjs) and the Node runtime (@tensorflow/tfjs-node).
  • Performance: ~98% validation accuracy on the curated validation split.

Quick Start

# 1. Clone the repository
git clone https://github.com/osnaren/forest-fire.git
cd forest-fire/v2

# 2. Install dependencies
npm install

# 3. Configure environment
cp env.example .env.local
# supply KV_REST_API_URL and KV_REST_API_TOKEN from Upstash

# 4. Run locally
npm run dev

# 5. Visit the app
# Windows
start "" http://localhost:3000
# macOS
open http://localhost:3000

Keep public/model/ in sync if you retrain. Both the client UI and prediction API load the same TensorFlow.js artifacts.


Repository Structure

docs/                Project planning notes
tailwind.config.ts   Shared Tailwind setup for v2
v1/                  Legacy Teachable Machine demo (static site)
v2/                  Next.js 14 application (primary)
└── public/model/    MobileNet model.json + weights shared by app & API

Roadmap

  • ✅ Production-ready Next.js experience with API explorer and rate-limited inference
  • ✅ Legacy v1 preserved for historical context
  • 🔄 Expand automated testing around predictions and UI flows
  • 🔄 Explore offline-first packaging and PWA capabilities

Share ideas by opening an issue or discussion.


Community

Have a partnership or research question? Reach out:

Email Twitter GitHub LinkedIn


License

The codebase and bundled model assets are released under the Forest Fire Proprietary License. Redistribution, modification, or commercial use is not permitted without prior written approval. See LICENSE for full terms.

The dataset reference, Forest Fire C4, is available under CC BY-NC-SA 4.0. You may use it for non-commercial projects by providing attribution and sharing derivative work under the same license.


Built with care for first responders, researchers, and anyone monitoring our forests.