| --- |
| 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 |