File size: 2,306 Bytes
ecde422 d10070a 0fb453e ecde422 ce19262 ecde422 9d84265 eaf43f9 ecde422 9d84265 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
---
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. |