PyTorch-Wildlife

June 2, 2026 · View on GitHub

PyTorch-Wildlife — open-source AI framework for wildlife monitoring from the Microsoft AI for Good Lab

PyTorch-Wildlife

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.

Quick Start

pip install PytorchWildlife
import 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:

Available Models

Detection

ModelArchitectureDescription
MegaDetectorV6YOLOv10 / YOLOv9 / RT-DETRAnimal detection in camera-trap images
MegaDetectorV5YOLOv5Previous generation, widely deployed
DeepfauneDetectorYOLOv8European ecosystem detection
HerdNetCNN localizationPoint-based detection for aerial imagery

Classification

ModelDescription
AI4GAmazonRainforestSpecies classification for Amazon Rainforest
AI4GSnapshotSerengetiSpecies classification for African savanna
AI4GOpossumOpossum vs. non-opossum classifier
DeepfauneClassifierEuropean ecosystem species classifier
DFNEDeepfaune fine-tuned for Northeastern North America

See the Model Zoo for full details, performance benchmarks, and version history.

Part of the Biodiversity Ecosystem

PyTorch-Wildlife is part of the larger open-source ecosystem from the Microsoft AI for Good Lab:

RepoPurpose
microsoft/BiodiversityThe umbrella repository — documentation hub for the AI for Good Lab's biodiversity work
microsoft/Pytorch-WildlifeThis repo — the unified deep learning framework
microsoft/MegaDetectorAnimal detection in camera-trap imagery (documentation)
microsoft/SPARROWSolar-Powered Acoustic and Remote Recording Observation Watch — AI-enabled edge device
microsoft/MegaDetector-AcousticBioacoustic models for audio-based wildlife monitoring
microsoft/MegaDetector-ClassifierCamera-trap species classification fine-tuning — adapt classifiers to your own datasets and geographic regions
microsoft/MegaDetector-OverheadPoint-based detection for overhead and aerial imagery
SPARROW StudioDesktop application for running all models with a graphical interface

Questions? Email us or join the Discord