File size: 2,423 Bytes
bdc41e3 56d67d6 bdc41e3 56d67d6 bdc41e3 56d67d6 bdc41e3 56d67d6 bdc41e3 56d67d6 bdc41e3 | 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 100 101 102 103 104 105 106 | ---
datasets:
- pyronear/pyro-dataset
license: apache-2.0
tags:
- wildfire
- fire-detection
- yolo
- object-detection
- pyronear
---
# pyronear/yolo11s_sensitive-detector
Pyronear YOLO model for early wildfire smoke detection.
**Release name:** Sensitive Detector
**Latest version:** v1.1.0
Each release is a git tag on this repo (e.g. `v1.1.0`). Pin a version with
`revision="v1.1.0"` in `hf_hub_download` / `snapshot_download`.
## Model details
| Field | Value |
|---|---|
| Architecture | yolo11s |
| Image size | 1024 |
| Epochs | 50 |
| Optimizer | AdamW |
| Weights SHA-256 | `a9bfa11c559e4b22...` |
| Training data MD5 | `409302377938ce2a...` |
## Files
| File | Description |
|---|---|
| `best.pt` | PyTorch weights |
| `onnx_cpu.tar.gz` | ONNX export (cpu) |
| `ncnn_cpu.tar.gz` | NCNN export (cpu) |
| `manifest.yaml` | Full training manifest |
## Usage
### PyTorch (ultralytics)
```python
from ultralytics import YOLO
model = YOLO("best.pt")
results = model.predict("image.jpg", imgsz=1024, conf=0.2, iou=0.01)
for r in results:
print(r.boxes) # bounding boxes + confidences
```
### ONNX (onnxruntime)
```python
from huggingface_hub import hf_hub_download
import onnxruntime as ort
import numpy as np
from PIL import Image
path = hf_hub_download(repo_id="pyronear/yolo11s_sensitive-detector", filename="onnx_cpu.tar.gz")
session = ort.InferenceSession(path, providers=["CPUExecutionProvider"])
img = Image.open("image.jpg").resize((1024, 1024))
x = np.array(img).transpose(2, 0, 1)[None].astype(np.float32) / 255.0
outputs = session.run(None, {session.get_inputs()[0].name: x})
```
### NCNN
```bash
# Unzip first
tar -xzf ncnn_cpu.tar.gz
```
### Download with huggingface_hub
```python
from huggingface_hub import snapshot_download
local_dir = snapshot_download(repo_id="pyronear/yolo11s_sensitive-detector") # latest
local_dir = snapshot_download(repo_id="pyronear/yolo11s_sensitive-detector", revision="v1.1.0") # pinned
```
### Pyronear engine (sequential smoke detection)
```python
from pyroengine.engine import Engine
engine = Engine(
conf_thresh=0.20,
nb_consecutive_frames=5,
)
# feed frames one by one — engine.predict() returns a score
score = engine.predict(pil_image, cam_id="camera_01")
if score > engine.conf_thresh:
print("Smoke detected!")
```
## About Pyronear
[Pyronear](https://pyronear.org) builds open-source tools for early wildfire detection.
|