Forest Guardian: YOLOv8n-seg for invasive acacia
Segments invasive acacia stands in top-down satellite imagery of Portugal. 🥇 1st place overall, JunctionX Lisbon 2025.
▶ Try it in your browser · Code · Dataset
Model
| Architecture | YOLOv8n-seg (3.4M params) |
| Training | Fine-tuned 15 epochs at 640 px |
| Formats | PyTorch .pt; ONNX export (13 MB) used in the browser demo |
Results (validation split)
| Metric | Value |
|---|---|
| Box mAP@50 | 0.56 |
| Mask mAP@50 | 0.24 |
| Acacia tiles flagged | 22 / 32 |
| Negative tiles flagged | 0 / 16 |
Training data
Satellite tiles (Esri World Imagery) cut around acacia stands mapped in Portugal's COS2018 land-use map (class 5.1.1.6), plus tiles of other land as negatives. Masks are COS2018 polygons rasterised to 640×640. See the dataset card.
Usage
from huggingface_hub import hf_hub_download
from ultralytics import YOLO
weights = hf_hub_download("duartepcruz/forest-guardian-yolov8-seg", "best.pt")
model = YOLO(weights)
results = model.predict("tile.jpg", imgsz=640, conf=0.25)
results[0].show()
Intended use
This is a first pass that points foresters at places worth checking. It is tuned to stay quiet when unsure, so an empty result means "nothing obvious", not "no acacia".
Limitations
- Recall: it misses about a third of acacia stands, especially in yellow bloom (most training tiles show non-flowering trees). Lowering
confto about 0.15 helps. - Coarse masks: the labels are map polygons at landscape scale, not tree crowns, so the boxes are more reliable than the mask outlines.
- Domain: it was trained on a single satellite basemap at a similar zoom. Drone imagery, other seasons and other resolutions are out of distribution.
- Labels: COS2018 is a land-use map, not field-verified ground truth.