File size: 2,478 Bytes
02d8e71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
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.