odiug77 commited on
Commit
39b85fd
Β·
verified Β·
1 Parent(s): 9232eae

Update readme.md

Browse files
Files changed (1) hide show
  1. README.md +51 -73
README.md CHANGED
@@ -10,83 +10,61 @@ tags:
10
  - smoke
11
  - fire
12
  - yolo
13
- - boundybox
14
  - yolo26
15
  ---
16
 
17
- # Wildfire Smoke and Flame Detection – YOLOv26
18
 
19
  ## Overview
20
 
21
- This model is based on **YOLOv26m** and has been specifically trained to detect **wildfire smoke and flames** in outdoor environments.
22
 
23
- It is designed for early wildfire detection using standard motorized RGB surveillance cameras positioned at strategic observation points such as hills, towers, or remote monitoring stations.
24
-
25
- The system operates by continuously capturing images while the camera rotates across the monitored area. Each captured frame is processed by the model to automatically identify potential fire events.
26
 
27
  ## 🎯 Purpose
28
 
29
- The primary goal of this model is **early wildfire detection**, enabling faster response times and reducing environmental and economic damage.
30
-
31
- It is optimized for:
32
-
33
- - Daytime wildfire detection
34
- - Nighttime wildfire detection
35
- - Smoke recognition
36
- - Flame detection
37
- - Standard RGB camera imagery (no thermal sensors required)
38
-
39
- ## πŸ›°οΈ Deployment Scenario
40
 
41
- Typical workflow:
42
-
43
- 1. A motorized camera rotates and captures images at regular intervals.
44
- 2. Images are sent to the inference system.
45
- 3. The model analyzes each frame.
46
- 4. If smoke or flames are detected, an alert can be triggered.
47
 
48
  ## 🧠 Model Architecture
49
 
50
- - Architecture: YOLOv26m (fused)
51
- - Task: Object Detection
52
- - Classes: `smoke`, `fire`
53
- - Layers: 132
54
- - Parameters: 20,350,994
55
- - GFLOPs: 67.9
56
- - Input: RGB images
57
-
58
- ## πŸ“Š Model Performance
59
 
60
- Validation set:
61
- - Images: 100
62
- - Instances: 301
63
 
64
- ### Overall Metrics
65
 
66
- | Metric | Value |
67
- |--------------|-------|
68
- | Precision (P) | 0.632 |
69
- | Recall (R) | 0.509 |
70
- | mAP@0.50 | 0.539 |
71
- | mAP@0.50:0.95 | 0.306 |
 
72
 
73
  ### Per-Class Metrics
 
 
 
 
74
 
75
- | Class | Images | Instances | Precision | Recall | mAP@0.50 | mAP@0.50:0.95 |
76
- |--------|--------|-----------|-----------|--------|----------|---------------|
77
- | smoke | 97 | 125 | 0.715 | 0.722 | 0.748 | 0.475 |
78
- | fire | 34 | 176 | 0.550 | 0.295 | 0.330 | 0.138 |
79
-
80
- ### Inference Speed (per image)
81
-
82
- - Preprocess: 0.3 ms
83
- - Inference: 12.7 ms
84
- - Postprocess: 1.3 ms
85
- - Total: ~14.3 ms per image
86
-
87
- Approx. ~70 FPS theoretical throughput on Tesla T4 GPU.
88
-
89
- This model does not replace professional fire detection systems or human supervision.
90
 
91
  ## πŸš€ Inference Example (CPU)
92
 
@@ -95,27 +73,27 @@ Minimal example to run inference on **CPU** and print detection results.
95
  ```python
96
  from ultralytics import YOLO
97
 
98
- # Load trained model
99
  model = YOLO("wildfire-smoke-fire.pt")
100
 
101
- # Run inference on CPU
102
- results = model("image.jpg", device="cpu")
103
-
104
- # Ultralytics returns a list (even for a single image)
105
- r = results[0]
106
-
107
- # Print detected boxes
108
- print("Detected boxes:")
109
- print(r.boxes)
110
 
111
- # Print class names
112
- print("Class names:")
113
- print(r.names)
 
114
  ```
115
 
116
- ### Notes
117
 
118
- - Install Ultralytics:
 
 
119
  ```bash
120
  pip install ultralytics
121
- ```
 
 
 
 
 
 
10
  - smoke
11
  - fire
12
  - yolo
13
+ - bounding-box
14
  - yolo26
15
  ---
16
 
17
+ # Wildfire Smoke and Flame Detection – YOLOv26m (Updated)
18
 
19
  ## Overview
20
 
21
+ This model is based on the **YOLOv26m** architecture and has been specifically fine-tuned to detect **wildfire smoke and flames** in outdoor environments.
22
 
23
+ 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.
 
 
24
 
25
  ## 🎯 Purpose
26
 
27
+ The primary goal of this model is **early wildfire detection**, enabling faster response times and reducing environmental and economic damage.
 
 
 
 
 
 
 
 
 
 
28
 
29
+ Optimized for:
30
+ - **Daytime & Nighttime** wildfire detection.
31
+ - **Smoke Recognition:** Critical for long-distance early detection.
32
+ - **Flame Detection:** For immediate confirmation of fire events.
33
+ - **Standard RGB Imagery:** Works with standard optical cameras (no thermal sensors required).
 
34
 
35
  ## 🧠 Model Architecture
36
 
37
+ - **Architecture:** YOLOv26m (fused)
38
+ - **Task:** Object Detection
39
+ - **Classes:** `smoke`, `fire`
40
+ - **Layers:** 132
41
+ - **Parameters:** 20,350,994
42
+ - **GFLOPs:** 67.9
43
+ - **Input Resolution:** 640x640 (RGB)
 
 
44
 
45
+ ## πŸ“Š Model Performance (Latest Validation)
 
 
46
 
47
+ The model was trained for **80 epochs** using **Automatic Mixed Precision (AMP)** and **AdamW** optimizer.
48
 
49
+ ### Overall Metrics (Validation Set)
50
+ | Metric | Value | Improvement vs Previous |
51
+ | :--- | :--- | :--- |
52
+ | **Precision (P)** | 0.635 | +0.3% |
53
+ | **Recall (R)** | **0.681** | **+17.2%** |
54
+ | **mAP @0.50** | **0.675** | **+13.6%** |
55
+ | **mAP @0.50:0.95** | **0.425** | **+11.9%** |
56
 
57
  ### Per-Class Metrics
58
+ | Class | Images | Instances | Precision | Recall | mAP@0.50 | mAP@0.50:0.95 |
59
+ | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
60
+ | **Smoke** | 180 | 253 | 0.633 | 0.767 | 0.752 | 0.491 |
61
+ | **Fire** | 123 | 836 | 0.637 | 0.596 | 0.598 | 0.359 |
62
 
63
+ ### Inference Speed (Tesla T4 GPU)
64
+ - **Pre-process:** 0.3 ms
65
+ - **Inference:** 12.3 ms
66
+ - **Post-process:** 0.8 ms
67
+ - **Total Throughput:** ~74 FPS (theoretical)
 
 
 
 
 
 
 
 
 
 
68
 
69
  ## πŸš€ Inference Example (CPU)
70
 
 
73
  ```python
74
  from ultralytics import YOLO
75
 
76
+ # Load the trained model
77
  model = YOLO("wildfire-smoke-fire.pt")
78
 
79
+ # Run inference on an image
80
+ results = model("forest_view.jpg", conf=0.25)
 
 
 
 
 
 
 
81
 
82
+ # Process results
83
+ for r in results:
84
+ print(f"Detected {len(r.boxes)} objects.")
85
+ r.show() # Display annotated image
86
  ```
87
 
 
88
 
89
+ ## πŸš€ Usage Example
90
+
91
+ Install the required library:
92
  ```bash
93
  pip install ultralytics
94
+ ```
95
+
96
+ # πŸ› οΈ Training Configuration
97
+ - Optimizer: AdamW (lr=0.001667, momentum=0.9)
98
+ - Augmentations: Blur, MedianBlur, ToGray, CLAHE
99
+ - Environment: PyTorch 2.1.0+cu128 on Tesla T4