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:
- Hugging Face demo — upload images in your browser
- Google Colab notebook — free cloud GPU
Available Models
Detection
| 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 |
Classification
| 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.
Part of the Biodiversity Ecosystem
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 (documentation) |
| 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
Metadata
Release files for PytorchWildlife 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytorchwildlife-1.3.1.tar.gz | 112.8 kB | Without provenance | Details for pytorchwildlife-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytorchwildlife-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for pytorchwildlife-1.3.1-py3-none-any.whl |
Total release size: 273.4 kB
Release files / pytorchwildlife-1.3.1.tar.gz
| Download URL | pytorchwildlife-1.3.1.tar.gz |
|---|---|
| Size | 112.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5a51989a36950dde807af94cdc02934d1a53dd729897ebb1bc949c93004f907
|
|
BLAKE2b-256 checksum How to use checksums |
27ba717a4ca029299b865e7e2b39b389c61db0d748065d96b1085173c24a69c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pytorchwildlife-1.3.1-py3-none-any.whl
| Download URL | pytorchwildlife-1.3.1-py3-none-any.whl |
|---|---|
| Size | 160.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c678e5a7f44dce53d0235f541cf3b87e537c1bc107261bb8deda01add4b5ad6
|
|
BLAKE2b-256 checksum How to use checksums |
0c7395ed1f0573028e391d81672db0502aa1274b56f2f78bed7d0bab83b04a07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for PytorchWildlife 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.