Mateo's picture
Upload Sensitive Detector v1.1.0
56d67d6 verified
|
Raw
History Blame Contribute Delete
2.42 kB
---
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.