Downloads · 30 days
905
49% of all-time downloads
aryantyagiase/yolov8-fire-smoke-detection
yolov8-fire-smoke-detection is a object detection model from aryantyagiase. Use it when you need objects located in an image. It is set up for ultralytics.
A YOLOv8s object detection model fine-tuned to detect fire and smoke in images and video, trained via transfer learning on a public Roboflow dataset. Built as part of a hands-on deep learning / object detection learni…
Downloads · 30 days
905
49% of all-time downloads
All-time downloads
1.8K
Public
Repo size
18.9 MB
Likes
1
Public
Click a slice to open those files.
.pt9.4 MB · 53%
From the Hugging Face model README
A YOLOv8s object detection model fine-tuned to detect fire and smoke in images and video, trained via transfer learning on a public Roboflow dataset. Built as part of a hands-on deep learning / object detection learning project — full pipeline from raw dataset to real-time webcam inference.
yolov8s.pt (Ultralytics, pretrained on COCO)fire, smokebest.pt (PyTorch) and best.onnx (ONNX, for cross-platform/faster inference)| Setting | Value |
|---|---|
| Base weights | yolov8s.pt (transfer learning) |
| Epochs | 20 |
| Image size | 416x416 |
| Batch size | 16 |
| Optimizer | AdamW (auto-selected) |
| Early stopping patience | 5 |
| Training environment | Google Colab (T4 GPU) |
Trained on the Fire and Smoke Detection dataset from Roboflow Universe (~5,957 images, 2 classes, pre-annotated in YOLO format). Source: Roboflow Universe
| Metric | Score |
|---|---|
| mAP50 | 0.506 |
| mAP50-95 | 0.231 |
| Precision | 0.542 |
| Recall | 0.540 |
from ultralytics import YOLO
# load the model
model = YOLO("best.pt") # or "best.onnx"
# run inference on an image
results = model.predict("your_image.jpg", conf=0.4)
results[0].show()
For real-time webcam inference:
import cv2
from ultralytics import YOLO
model = YOLO("best.pt")
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
if not ret:
break
results = model.predict(source=frame, conf=0.4, verbose=False)
annotated = results[0].plot()
cv2.imshow("Fire & Smoke Detection", annotated)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
Trained and documented as part of a self-directed deep learning learning journey — architecture theory, from-scratch math, full training pipeline, and real-time deployment.