Wildlife Detection with YOLOv26 β Drone RGB & Thermal Models
A collection of five YOLOv26x models fine-tuned for wildlife detection in drone imagery, supporting both RGB and thermal (infrared) modalities. Models were trained using the Ultralytics framework on 1024Γ1024 px drone images.
Models Overview
| Model | Modality | Dataset | Epochs | mAP50 | mAP50-95 | Notes |
|---|---|---|---|---|---|---|
thermal_original |
Thermal | Original thermal dataset | 25 | 0.217 | β | Baseline thermal model |
thermal_merged |
Thermal | Original + supplemental thermal data | 23 | 0.390 | 0.250 | Refined thermal model |
rgb |
RGB | Full RGB dataset | 72 | 0.946 | 0.655 | Primary RGB model |
matched_rgb |
RGB | Matched RGB-thermal pairs | 43 | 0.731 | 0.431 | Cross-modal comparison |
matched_thermal |
Thermal | Matched RGB-thermal pairs | 27 | 0.719 | 0.289 | Cross-modal comparison |
Matched models were trained on the same spatially co-registered scene pairs to enable fair modality comparison.
Training Details
All models share the following configuration:
| Parameter | Value |
|---|---|
| Base model | yolo26x.pt |
| Image size | 1024 Γ 1024 px |
| Batch size | 4 |
| Max epochs | 200 |
| Early stopping patience | 20 epochs |
| Optimizer | Auto |
| AMP (mixed precision) | Enabled |
| Close mosaic | Last 10 epochs |
| Data augmentation | RandAugment, erasing (p=0.4), fliplr (p=0.5) |
Repository Structure
.
βββ README.md
βββ inference.py # Sample inference code
βββ thermal_original/
β βββ weights/
β β βββ best.pt # Best checkpoint
β β βββ last.pt # Last checkpoint
β βββ args.yaml # Training configuration
β βββ results.csv # Per-epoch training metrics
β βββ results.png # Training curves
βββ thermal_merged/
β βββ ...
βββ rgb/
β βββ ...
βββ matched_rgb/
β βββ ...
βββ matched_thermal/
βββ ...
Quick Start
Installation
pip install ultralytics
Load a model and run inference
from ultralytics import YOLO
# Choose your model
model = YOLO("rgb/weights/best.pt") # RGB drone imagery
# model = YOLO("thermal_merged/weights/best.pt") # Thermal imagery
# Run inference on an image
results = model("path/to/your/image.jpg")
# Display / save results
results[0].show()
results[0].save("output.jpg")
# Access detections
for box in results[0].boxes:
print(f"Class: {box.cls.item()}, Conf: {box.conf.item():.2f}, BBox: {box.xyxy[0].tolist()}")
Batch inference
from ultralytics import YOLO
from pathlib import Path
model = YOLO("rgb/weights/best.pt")
# Run on a folder of images
results = model(
source="path/to/images/",
imgsz=1024,
conf=0.25,
iou=0.45,
save=True,
project="detections",
name="run"
)
Modality comparison (matched dataset)
from ultralytics import YOLO
rgb_model = YOLO("matched_rgb/weights/best.pt")
thermal_model = YOLO("matched_thermal/weights/best.pt")
# Run both models on co-registered image pairs
rgb_results = rgb_model("rgb_frame.jpg", imgsz=1024, conf=0.25)
thermal_results = thermal_model("thermal_frame.png", imgsz=1024, conf=0.25)
print(f"RGB detections: {len(rgb_results[0].boxes)}")
print(f"Thermal detections: {len(thermal_results[0].boxes)}")
See inference.py for a complete script with CLI argument parsing.
Results Visualizations
Training curves, precision-recall curves, and validation batch predictions are included in each model subdirectory (.png / .jpg files).
License
Apache 2.0 β see LICENSE.
- Downloads last month
- 1,810