A newer version of the Gradio SDK is available:
5.44.1
metadata
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
pip install gradio opencv-python-headless torch transformers pillow numpy
Usage
1. Gradio Web Application
Run the web interface:
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:
# 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:
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
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.