How fikrifz-17/fire-smoke-detection works
This Flask application detects fire and smoke in webcam frames or uploaded videos, annotates detections, and streams or returns processed media. The main runtime lives in app.py: its routes coordinate input handling, the shared YOLO detector, and media output. The README documents the live and upload pages; source excerpts show the detection and processing implementation. The templates and model artifact are present in the tree but were not sampled, so their internal behavior is not inferred.
Main entry points: app.py Flask routes · live.html Live page · image.html Upload page · best.pt YOLO weights
Components 11
Web interface
- Flask routes
app.py - Live page
templates/live.html - Upload page
templates/image.html
Detection runtime
- Fire-smoke detector
app.py - YOLO weights
models/best.pt - YOLO runtime
Media processing
- Webcam
- Live frame loop
app.py - Uploaded video
- Processed video
uploads
Other components
- User
Connections 15
- User → Flask routes: opens live page
README.md - Flask routes → Live page: renders
app.py - User → Flask routes: opens upload page
README.md - Flask routes → Upload page: renders
app.py - Flask routes → Live frame loop: starts stream
app.py - Live frame loop → Webcam: reads frames
app.py - Live frame loop → Fire-smoke detector: detects objects
app.py - Live frame loop → Flask routes: streams frames
app.py - Fire-smoke detector → YOLO runtime: runs prediction
app.py - Fire-smoke detector → YOLO weights: loads weights
app.py - User → Uploaded video: provides video
- Uploaded video → Flask routes: uploads for detection
- Flask routes → Fire-smoke detector: processes frames
app.py - Flask routes → Processed video: writes processed video
app.py - Flask routes → User: returns video
app.py