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.
| 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. |
- 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.
# 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:3000Keep
public/model/in sync if you retrain. Both the client UI and prediction API load the same TensorFlow.js artifacts.
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
- ✅ 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.
- Issues: github.com/osnaren/forest-fire/issues
- Live Updates: fire.osnaren.com
- Dataset Feedback: Comment directly on the Kaggle dataset
Have a partnership or research question? Reach out:
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.