Overview

π Welcome to PyTorch-Wildlife¶
PyTorch-Wildlife is an AI platform designed for the AI for Conservation community to create, modify, and share powerful AI conservation models. It allows users to directly load a variety of models including MegaDetector, DeepFaune, and HerdNet from our ever expanding model zoo for both animal detection and classification.
Our scope now spans well beyond camera-trap imagery β we have active work in MegaDetector-Acoustic for bioacoustic species identification, MegaDetector-Overhead for aerial wildlife detection, and edge computing for remote field deployments.
Coming from an older version? OWL is now MegaDetector-Overhead, the bioacoustics module is now MegaDetector-Acoustic, and the repo has moved from
microsoft/CameraTrapstomicrosoft/Biodiversity(old links redirect automatically). See the full naming changes in the v1.3.0 release notes.
π Quick Start¶
π Here is a brief example on how to perform detection and classification on a single image using PyTorch-Wildlife
import numpy as np
from PytorchWildlife.models import detection as pw_detection
from PytorchWildlife.models import classification as pw_classification
img = np.random.randn(3, 1280, 1280)
# Detection
detection_model = pw_detection.MegaDetectorV6() # Model weights are automatically downloaded.
detection_result = detection_model.single_image_detection(img)
#Classification
classification_model = pw_classification.AI4GAmazonRainforest() # Model weights are automatically downloaded.
classification_results = classification_model.single_image_classification(img)
βοΈ Install PyTorch-Wildlife¶
Please refer to our installation guide for more installation information.πΌοΈ Examples¶
Image detection using MegaDetector¶
Credits to Universidad de los Andes, Colombia.
Image classification with MegaDetector and AI4GAmazonRainforest¶

Credits to Universidad de los Andes, Colombia.
Opossum ID with MegaDetector and AI4GOpossum¶

Credits to the Agency for Regulation and Control of Biosecurity and Quarantine for GalΓ‘pagos (ABG), Ecuador.