Unified open-source AI framework for wildlife monitoring and conservation.
Microsoft AI for Good Lab — camera-trap detection, species classification, bioacoustic analysis, and more.
PyTorch-Wildlife is the collaborative deep learning framework that powers the Microsoft AI for Good Lab's biodiversity work. It hosts detection models, species classifiers, and the tools needed to run them — from single-image inference to large-scale batch processing.
MegaDetector, the most widely used camera-trap detection model in conservation, is invoked through PyTorch-Wildlife. So are the species classifiers for Amazon Rainforest, Snapshot Serengeti, and European ecosystems.
pip install PytorchWildlifeimport numpy as np
from PytorchWildlife.models import detection as pw_detection
from PytorchWildlife.models import classification as pw_classification
# Detection — weights download automatically
detection_model = pw_detection.MegaDetectorV6()
detection_result = detection_model.single_image_detection("path/to/image.jpg")
# Classification
classification_model = pw_classification.AI4GAmazonRainforest()
classification_result = classification_model.single_image_classification("path/to/image.jpg")Try without installing anything:
- Hugging Face demo — upload images in your browser
- Google Colab notebook — free cloud GPU
| Model | Architecture | Description |
|---|---|---|
MegaDetectorV6 |
YOLOv10 / YOLOv9 / RT-DETR | Animal detection in camera-trap images |
MegaDetectorV5 |
YOLOv5 | Previous generation, widely deployed |
DeepfauneDetector |
YOLOv8 | European ecosystem detection |
HerdNet |
CNN localization | Point-based detection for aerial imagery |
| Model | Description |
|---|---|
AI4GAmazonRainforest |
Species classification for Amazon Rainforest |
AI4GSnapshotSerengeti |
Species classification for African savanna |
AI4GOpossum |
Opossum vs. non-opossum classifier |
DeepfauneClassifier |
European ecosystem species classifier |
DFNE |
Deepfaune fine-tuned for Northeastern North America |
See the Model Zoo for full details, performance benchmarks, and version history.
PyTorch-Wildlife is part of the larger open-source ecosystem from the Microsoft AI for Good Lab:
| Repo | Purpose |
|---|---|
| microsoft/Biodiversity | The umbrella repository — documentation hub for the AI for Good Lab's biodiversity work |
| microsoft/Pytorch-Wildlife | This repo — the unified deep learning framework |
| microsoft/MegaDetector | Animal detection in camera-trap imagery |
| microsoft/SPARROW | Solar-Powered Acoustic and Remote Recording Observation Watch — AI-enabled edge device |
| microsoft/MegaDetector-Acoustic | Bioacoustic models for audio-based wildlife monitoring |
| microsoft/MegaDetector-Classifier | Camera-trap species classification fine-tuning — adapt classifiers to your own datasets and geographic regions |
| microsoft/MegaDetector-Overhead | Point-based detection for overhead and aerial imagery |
| SPARROW Studio | Desktop application for running all models with a graphical interface |
Questions? Email us or join the
