File size: 2,999 Bytes
9232eae
 
 
 
 
 
 
 
 
 
 
 
39b85fd
9232eae
 
 
39b85fd
9232eae
 
 
39b85fd
9232eae
39b85fd
9232eae
 
 
39b85fd
9232eae
39b85fd
 
 
 
 
9232eae
 
 
39b85fd
 
 
 
 
 
 
9232eae
39b85fd
9232eae
39b85fd
9232eae
39b85fd
 
 
 
 
 
 
9232eae
 
39b85fd
 
 
 
9232eae
39b85fd
 
 
 
 
9232eae
 
 
 
 
 
 
 
39b85fd
9232eae
 
39b85fd
 
9232eae
39b85fd
 
 
 
9232eae
 
 
39b85fd
 
 
9232eae
 
39b85fd
 
 
 
 
 
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
license: apache-2.0
datasets:
- odiug77/wildfire
base_model:
- Ultralytics/YOLO26
pipeline_tag: object-detection
tags:
- wildfire
- smoke
- fire
- yolo
- bounding-box
- yolo26
---

# Wildfire Smoke and Flame Detection โ€“ YOLOv26m (Updated)

## Overview

This model is based on the **YOLOv26m** architecture and has been specifically fine-tuned to detect **wildfire smoke and flames** in outdoor environments.

Compared to previous versions, this update utilizes a larger dataset and optimized training hyperparameters, resulting in a significant boost in **Recall** and **mAP**. It is designed for early wildfire detection using standard RGB surveillance cameras positioned at strategic observation points such as hills, fire towers, or remote monitoring stations.

## ๐ŸŽฏ Purpose

The primary goal of this model is **early wildfire detection**, enabling faster response times and reducing environmental and economic damage. 

Optimized for:
- **Daytime & Nighttime** wildfire detection.
- **Smoke Recognition:** Critical for long-distance early detection.
- **Flame Detection:** For immediate confirmation of fire events.
- **Standard RGB Imagery:** Works with standard optical cameras (no thermal sensors required).

## ๐Ÿง  Model Architecture

- **Architecture:** YOLOv26m (fused)
- **Task:** Object Detection
- **Classes:** `smoke`, `fire`
- **Layers:** 132
- **Parameters:** 20,350,994
- **GFLOPs:** 67.9
- **Input Resolution:** 640x640 (RGB)

## ๐Ÿ“Š Model Performance (Latest Validation)

The model was trained for **80 epochs** using **Automatic Mixed Precision (AMP)** and **AdamW** optimizer. 

### Overall Metrics (Validation Set)
| Metric | Value | Improvement vs Previous |
| :--- | :--- | :--- |
| **Precision (P)** | 0.635 | +0.3% |
| **Recall (R)** | **0.681** | **+17.2%** |
| **mAP @0.50** | **0.675** | **+13.6%** |
| **mAP @0.50:0.95** | **0.425** | **+11.9%** |

### Per-Class Metrics
| Class | Images | Instances | Precision | Recall | mAP@0.50 | mAP@0.50:0.95 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **Smoke** | 180 | 253 | 0.633 | 0.767 | 0.752 | 0.491 |
| **Fire** | 123 | 836 | 0.637 | 0.596 | 0.598 | 0.359 |

### Inference Speed (Tesla T4 GPU)
- **Pre-process:** 0.3 ms
- **Inference:** 12.3 ms
- **Post-process:** 0.8 ms
- **Total Throughput:** ~74 FPS (theoretical)

## ๐Ÿš€ Inference Example (CPU)

Minimal example to run inference on **CPU** and print detection results.

```python
from ultralytics import YOLO

# Load the trained model
model = YOLO("wildfire-smoke-fire.pt")

# Run inference on an image
results = model("forest_view.jpg", conf=0.25)

# Process results
for r in results:
    print(f"Detected {len(r.boxes)} objects.")
    r.show()  # Display annotated image
```


## ๐Ÿš€ Usage Example

Install the required library:
```bash
pip install ultralytics
```

# ๐Ÿ› ๏ธ Training Configuration
- Optimizer: AdamW (lr=0.001667, momentum=0.9)
- Augmentations: Blur, MedianBlur, ToGray, CLAHE
- Environment: PyTorch 2.1.0+cu128 on Tesla T4