Pravesh-21's picture sreeharivp23's picture
Duplicate from sreeharivp23/fire-segmentation-dataset
02d8e71
|
Raw History Blame Contribute Delete
2.48 kB
---
license: other
license_name: mixed-source
license_link: https://github.com/cair/Fire-Detection-Image-Dataset
task_categories:
- image-segmentation
tags:
- fire-detection
- instance-segmentation
- yolo
- ultralytics
- safety
size_categories:
- 1K<n<10K
---
# Fire Segmentation Dataset (YOLO-seg format)
Instance-segmentation dataset for **fire** detection: 1,348 images with
polygon mask labels in Ultralytics YOLO segmentation format. Built to train
[sreeharivp23/fire-segmentation-yolo11n](https://huggingface.co/sreeharivp23/fire-segmentation-yolo11n).
## Contents
| Split | Images |
|---|---|
| train | 1,146 |
| val | 202 |
- **1,098 fire images** with one or more `fire` polygon instances
- **250 negatives** (no fire) with empty label files
```
fire_seg/
├── data.yaml # Ultralytics dataset config (1 class: fire)
├── images/{train,val}/ # .jpg / .png images
└── labels/{train,val}/ # YOLO-seg .txt labels: "0 x1 y1 x2 y2 ..." (normalised)
```
## Usage
```python
from huggingface_hub import snapshot_download
from ultralytics import YOLO
path = snapshot_download("sreeharivp23/fire-segmentation-dataset", repo_type="dataset")
model = YOLO("yolo11n-seg.pt")
model.train(data=f"{path}/data.yaml", epochs=60, imgsz=640)
```
> Note: `data.yaml` contains a `path:` entry pointing at the original build
> location — update it to the downloaded folder (or delete the line and pass
> absolute paths) before training.
## How the labels were made
Labels are **machine-generated**, not human-annotated:
1. A pretrained YOLOv8 fire/smoke bounding-box detector proposed fire regions.
2. SAM 2.1 (base) converted each box into a pixel mask.
3. Masks were polygonised (OpenCV contours + Douglas-Peucker) into YOLO-seg
polygons.
4. Images the detector missed fell back to an HSV flame-colour heuristic
(219 images); 12 images yielded nothing and were dropped.
Expect some label noise around smoke/glow boundaries and small flames. A
YOLO11n-seg fine-tuned on this data reaches mask mAP50 ≈ 0.54 on the val
split.
## Image sources & licensing
Images originate from two public research datasets; this repackaging adds
machine-generated segmentation labels:
- [CAIR Fire-Detection-Image-Dataset](https://github.com/cair/Fire-Detection-Image-Dataset)
- [DeepQuestAI Fire-Smoke-Dataset](https://github.com/DeepQuestAI/Fire-Smoke-Dataset)
Check the upstream repositories for their exact terms before commercial use.