Instructions to use rabahdev/fire-smoke-yolov8n with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use rabahdev/fire-smoke-yolov8n with ultralytics:
from ultralytics import YOLOvv8 model = YOLOvv8.from_pretrained("rabahdev/fire-smoke-yolov8n") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
YOLOv8n β Fire & Smoke Detector (D-Fire fine-tune)
YOLOv8n fine-tuned on the D-Fire dataset for detecting smoke and fire in images.
Classes
0β smoke1β fire
Files
best.ptβ fine-tuned weights (use this)last.ptβ final-epoch weights
Results (test split, 4,306 images)
| Metric | All | Smoke | Fire |
|---|---|---|---|
| mAP50 | 0.754 | β | β |
| mAP50-95 | 0.430 | 0.499 | 0.362 |
| Precision | 0.766 | β | β |
| Recall | 0.688 | β | β |
Training config
- Base:
yolov8n.pt(COCO pretrained) - Epochs: 50, image size: 640, batch: 16
- Optimizer: MuSGD (auto), lr0=0.01
- Device: Apple MPS
Usage
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
ckpt = hf_hub_download(repo_id="rabahdev/fire-smoke-yolov8n", filename="best.pt")
model = YOLO(ckpt)
results = model("image.jpg")
results[0].show()
Dataset
- D-Fire (smoke + fire detection), YOLO format
- Train: 14,122 β Val: 3,099 β Test: 4,306
License
AGPL-3.0 (inherited from Ultralytics YOLOv8).
- Downloads last month
- 677