Skip to content

microsoft/MegaDetector-Overhead

Repository files navigation

MegaDetector-Overhead

Docs License: MIT PyTorch-Wildlife

Open-source AI for detecting wildlife in overhead and aerial imagery.

MegaDetector-Overhead extends the MegaDetector detection framework to drone and UAV survey imagery, handling the unique challenges of overhead perspectives: small targets, variable altitude, and nadir-angle distortion. It is powered by PyTorch-Wildlife and is part of the microsoft/Biodiversity ecosystem.

This repository ships the training, evaluation, and inference stack for the OWL model family:

Model Backbone Notes
OWL-C DLA-34 (HerdNet detection branch) Baseline; fast inference
OWL-T DLA-34 + Swin transformer multiscale residual Sharper localization on cluttered backgrounds
OWL-D (S / B / L / H) DINOv3 ViT + DPT decoder Highest quality; foundation-model encoder

The legacy HerdNet multi-class model is also available. See Model Zoo for the full list.


Documentation

Full documentation at microsoft.github.io/MegaDetector-Overhead


Quick Start

The environment is managed with uv. One uv sync builds a Python 3.11 venv with all dependencies, the animaloc training package, and the vendored DINOv3 encoder.

# 1. Install uv (one-time)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Clone and sync
git clone https://github.com/microsoft/MegaDetector-Overhead
cd MegaDetector-Overhead
uv sync                  # CPU build of PyTorch (works everywhere)
# For a GPU, install a matching build after syncing (uv auto-detects the driver):
#   uv pip install torch torchvision --torch-backend=auto   # see INSTALL.md → GPU support

# 3. Smoke test
uv run python -c "import animaloc.models, dinov3; print('OK')"

See INSTALL.md for DINOv3 weights download and troubleshooting.


Repository Layout

animaloc/    # Training/eval package vendored from HerdNet (MIT)
dinov3/      # DINOv3 encoder vendored from facebookresearch/dinov3 (DINOv3 License)
tools/       # train.py, test.py, infer.py, patcher.py
configs/     # Hydra configs for OWL-C / OWL-D / OWL-T training and eval
docs/        # MkDocs Material site (build with `uv run --extra docs mkdocs build`)

See NOTICE for upstream attribution and third-party licenses.


Ecosystem

Repository Description
microsoft/Biodiversity Umbrella hub — PyTorch-Wildlife, MegaDetector, ecosystem overview
microsoft/MegaDetector Animal, human, and vehicle detection for camera-trap images
microsoft/PytorchWildlife The collaborative deep learning framework for wildlife monitoring
microsoft/MegaDetector-Overhead This repo — wildlife detection in aerial and drone imagery
microsoft/MegaDetector-Acoustic Bioacoustic AI for audio-based wildlife monitoring
microsoft/MegaDetector-Sonar Sonar-based wildlife detection for aquatic monitoring
microsoft/SPARROW Solar-Powered Acoustic and Remote Recording Observation Watch

Citation

If you use MegaDetector-Overhead in your research, please cite:

@article{chacon2026overhead,
  title={Overhead Wildlife Locator (OWL): Benchmarking Weakly Supervised Learning for Aerial Wildlife Surveys},
  author={Chac{\'o}n, Isai Daniel and Miao, Zhongqi and Demuro, Bruno and Robinson, Caleb and Dodhia, Rahul and Otarashvili, Lasha and Holmberg, Jason and Larsen, Kirk and Frederick, Howard and Pamperin, Nathan J and others},
  journal={arXiv preprint arXiv:2606.13911},
  year={2026}
}

About

MegaDetector-Overhead — The Microsoft open-source AI for overhead wildlife detection. Point-based detection model for aerial and drone imagery, identifying wildlife from above. Maintained by Microsoft AI for Good Lab. Part of the Pytorch-Wildlife ecosystem.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages