How x-men01/yolov10-fire-and-smoke-detection works
Project type and purpose
• This is a domain-specific machine-learning system for real-time fire and smoke detection. It comprises:
• A data-processing pipeline (data cleaning notebook)
• A model-training workflow producing YOLOv10 weights
• An inference/demo application (demo/app.py) served via a web interface (Hugging Face Spaces)
File structure
• Top‐level:
• README.md – overall project description, metrics, usage
• clean_dataset_with_cleanvision_libary.ipynb – data‐cleaning notebook
• demo/
– app.py (inference & UI glue code)
– examples/ (sample inputs)
– requirements.txt (runtime dependencies for demo)
• models/ (pretrained YOLOv10 .pt weight files)
• No separate “src” or “backend” folders; the demo folder doubles as the inference service codebase.
• External build/deployment: via Hugging Face Spaces (not tracked in repo).
README for additional insights
• Data source: Roboflow image dataset
• Data cleaning: cleanvision library
• Model: YOLOv10 trained, evaluated with precision/recall/mAP50
• Demo: live Hugging Face app (likely Gradio)
Main components & their relationships
a. Data Ingestion & Cleaning
• Raw images (Roboflow) → cleanvision → cleaned dataset (123k images)
b. Model Training
• Cleaned dataset → YOLOv10 training script (outside this repo) → model weights (.pt) → stored in models/
c. Model Storage
• models/ directory or cloud storage (Hugging Face Model Hub)
d. Inference Service / Demo App
e. Front-end UI
• Gradio/Streamlit interface (embedded in demo/app.py) → user uploads video/image or streams camera feed → displays annotated output
f. Deployment on Hugging Face Spaces
• The entire demo folder (code + requirements) deployed as a Space for public access
Architectural patterns & design principles
• Pipeline structure: clear separation of data cleaning, training, inference
• Reuse of pretrained weights: modular model storage
• Single‐process inference service with lightweight web front-end (no heavy microservices)
• Minimal dependencies (cleanvision, ultralytics or PyTorch, Gradio)