This tutorial walks you through a complete wildlife detection workflow, from images to analysis results — all using the CLI.
- WildDetect installed (Installation Guide)
- Aerial images with wildlife
- Trained model or access to MLflow registry
- MLflow server running (optional but recommended)
graph LR
A[Aerial Images] --> B[Configure]
B --> C[Run Detection]
C --> D[View Results]
D --> E[Analyze]
style A fill:#e3f2fd
style C fill:#fff3e0
style E fill:#e8f5e9
mkdir D:\wildlife_detection
cd D:\wildlife_detection
# Create directories
mkdir images
mkdir results
mkdir configD:\wildlife_detection\
├── images\
│ ├── drone_001.jpg
│ ├── drone_002.jpg
│ └── ...
├── results\
└── config\
└── detection.yaml
cd wildetect
scripts\launch_mlflow.batAccess at: http://localhost:5000
Create config/detection.yaml:
model:
mlflow_model_name: "detector"
mlflow_model_alias: "production"
device: "cuda"
image_dir: "D:/wildlife_detection/images/"
processing:
batch_size: 32
tile_size: 800
overlap_ratio: 0.2
pipeline_type: "simple" # or "raster" for large images
confidence_threshold: 0.5
flight_specs:
flight_height: 120.0
gsd: 2.38 # Ground Sample Distance (cm/pixel)
output:
directory: "D:/wildlife_detection/results"
dataset_name: "my_detections" # FiftyOne dataset name
save_visualizations: trueIf not using MLflow:
model:
model_path: "D:/wildlife_detection/models/detector.pt"
device: "cuda"You can generate a starter detection config file using:
wildetect utils create-config detect -o config/detection.yamlwildetect detection detect -c config/detection.yamlcd wildetect
# Edit config/detection.yaml first
notepad config\detection.yaml
# Run
scripts\run_detection.batProcessing images: 100%|██████████| 50/50 [00:45<00:00, 1.11it/s]
Detection complete!
Results saved to: D:/wildlife_detection/results/results.json
Total detections: 1,234
results/
├── results.json # All detections with coordinates
└── visualizations/ # Annotated images (if enabled)
├── drone_001.jpg
└── ...
{
"image_path": "D:/wildlife_detection/images/drone_001.jpg",
"image_size": [1920, 1080],
"processing_time": 0.5,
"detections": [
{
"class_name": "elephant",
"confidence": 0.95,
"bbox": [100, 200, 150, 180],
"bbox_normalized": [0.052, 0.185, 0.078, 0.167]
}
]
}# Launch FiftyOne app
wildetect services fiftyone -a launch
# Get dataset info
wildetect services fiftyone -a info -d my_detectionsFeatures:
- Interactive viewing
- Filtering by confidence
- Filtering by species
- Export capabilities
# Open visualizations folder
explorer D:\wildlife_detection\results\visualizations# Launch the Streamlit interface
wildetect services uiNavigate to the results viewer section.
Run analysis on the detection results:
wildetect detection analyze D:/wildlife_detection/results/results.json \
-o D:/wildlife_detection/results/analysis/Export detection results to a FiftyOne dataset for further exploration:
# Export to COCO format
wildetect services fiftyone -a export -d my_detections -f coco -o exports/coco/
# Export to YOLO format
wildetect services fiftyone -a export -d my_detections -f yolo -o exports/yolo/For large GeoTIFF / orthomosaic files, use the raster pipeline:
# config/raster_detection.yaml
model:
mlflow_model_name: "detector"
device: "cuda"
image_paths:
- "D:/orthomosaics/large_ortho.tif"
processing:
tile_size: 800
overlap_ratio: 0.2
pipeline_type: "raster"
nms_threshold: 0.5
flight_specs:
gsd: 2.38 # Required for raster detection
output:
directory: "results/raster"wildetect detection detect -c config/raster_detection.yamlCheck your environment and GPU status:
wildetect utils infoThis shows Python version, PyTorch version, CUDA availability, GPU info, and installed dependencies.
Solutions:
- Increase batch size (if GPU memory allows)
- Use smaller tile size
- Enable GPU acceleration (
device: "cuda") - Use the multi-threaded pipeline (
pipeline_type: "mt")
Solutions:
- Reduce batch size
- Reduce tile size
- Use CPU instead of GPU (
device: "cpu") - Close other applications
Solutions:
- Check model is appropriate for your data
- Adjust confidence threshold
- Verify image quality
- Check GSD matches training data
Solutions:
- Verify MLflow server is running (
scripts\launch_mlflow.bat) - Check model name and alias match MLflow registry
- Verify model path if using a local file
- Check CUDA availability with
wildetect utils info
- Census Campaign Tutorial — Run a full census
- Dataset Preparation — Prepare your own training data
- Model Training — Train custom models
- WildDetect CLI Reference — All CLI commands
Congratulations! You've completed the end-to-end detection tutorial using the WildDetect CLI. You now know how to configure, run detection, visualize results, and export data.