wild-fire-tracker / README.md
space-sue's picture
Update README.md
eaf43f9 verified
---
title: Wild Fire Tracker
emoji: πŸ”₯
colorFrom: yellow
colorTo: purple
sdk: gradio
sdk_version: 5.33.1
app_file: app.py
pinned: false
license: mit
short_description: A wildfire monitor that alerts authorities in event of fire
tag: mcp-server-track
---
# πŸ”₯ Wild Fire Tracker
Real-time fire and smoke detection system using computer vision and AI. Available as both a web application and MCP (Model Context Protocol) server.
## Features
- πŸ”₯ **Fire Detection**: AI-powered fire detection with confidence scores
- πŸ’¨ **Smoke Detection**: Advanced smoke detection capabilities
- πŸ“Ή **Multiple Sources**: Webcam, RTSP streams, and video file uploads
- ⏱️ **Real-time Analysis**: Frame analysis every 10 seconds
- 🎨 **Visual Feedback**: Color-coded status overlays on video
- πŸ“Š **Confidence Scores**: Shows detection confidence percentages
## Installation
```bash
pip install gradio opencv-python-headless torch transformers pillow numpy
```
## Usage
### 1. Gradio Web Application
Run the web interface:
```bash
python app.py
```
Then open http://localhost:7860 in your browser.
**Features:**
- Upload video files (MP4, AVI, MOV)
- Connect to webcam or RTSP streams
- Real-time video display with status overlay
- Detection status with timestamps
### 2. Standalone MCP Server
For integration with MCP clients:
```bash
# Install MCP dependency
pip install mcp
# Run MCP server
python mcp_server_standalone.py
```
**MCP Tools:**
- `analyze_image`: Analyze base64 encoded images for fire/smoke
**Example MCP Client Usage:**
```python
import base64
import json
# Encode image to base64
with open("image.jpg", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
# Call MCP tool
result = await client.call_tool("analyze_image", {
"image_base64": image_b64
})
```
## Sample Test Videos
- [Fire Test Video](https://www.pexels.com/video/a-man-carrying-gear-walking-away-from-a-controlled-fire-8552246/)
- [Smoke Test Video](https://www.pexels.com/video/aerial-view-of-controlled-forest-fire-in-spring-31361444/)
## Status Legend
- 🟒 **Green**: All clear (no fire/smoke detected)
- 🟠 **Orange**: Fire detected
- ⚫ **Gray**: Smoke detected
- πŸ”΄ **Red**: Error or both fire & smoke detected
## License
MIT License - see LICENSE file for details.