Skip to content

microsoft/CameraTraps

Repository files navigation

image

A Collaborative Deep Learning Framework for Conservation



📣 Announcements

  • We have fully recreated our documentation page with MKDocs. Please take a look and let us know what you think! (Special thanks to @ss26 for creating the foundation of this documentation page!)

  • We will also be releasing new MegaDetectorV6 model weights this coming week and add new performance numbers in our model zoo. We did make a mistake when evaluating the V5 model because of input resolution mismatch as the V5 model was trained using 1280 size inputs and V6 models were trained using 640 models. Now we have retrained 1280 V6 models to keep everything consistent. We also evaluated our models using pycocotool this time instead of Ultralytics evaluation functions to make the evaluations on the MIT and Apache models more easier.

Previous versions:

👋 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. In the future, we will also include models that can be used for applications, including underwater images and bioacoustics. We want to provide a unified and straightforward experience for both practicioners and developers in the AI for conservation field. Your engagement with our work is greatly appreciated, and we eagerly await any feedback you may have.

Explore the codebase, functionalities and user interfaces of Pytorch-Wildlife through our documentation, interactive HuggingFace web app or local demos and notebooks.

🚀 Quick Start

👇 Here is a quick 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)

More models can be found in our model zoo

⚙️ Install Pytorch-Wildlife

pip install PytorchWildlife

Please refer to our installation guide for more installation information.

📃 Documentation

Please also go to our newly made dofumentation page for more information:

🖼️ Examples

Image detection using MegaDetector

animal_det_1
Credits to Universidad de los Andes, Colombia.

Image classification with MegaDetector and AI4GAmazonRainforest

animal_clas_1
Credits to Universidad de los Andes, Colombia.

Opossum ID with MegaDetector and AI4GOpossum

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

🖋️ Cite us!

We have recently published a summary paper on Pytorch-Wildlife. The paper has been accepted as an oral presentation at the CV4Animals workshop at this CVPR 2024. Please feel free to cite us!

@misc{hernandez2024pytorchwildlife,
      title={Pytorch-Wildlife: A Collaborative Deep Learning Framework for Conservation}, 
      author={Andres Hernandez and Zhongqi Miao and Luisa Vargas and Sara Beery and Rahul Dodhia and Juan Lavista},
      year={2024},
      eprint={2405.12930},
      archivePrefix={arXiv},
}

Also, don't forget to cite our original paper for MegaDetector:

@misc{beery2019efficient,
      title={Efficient Pipeline for Camera Trap Image Review},
      author={Sara Beery and Dan Morris and Siyu Yang},
      year={2019}
      eprint={1907.06772},
      archivePrefix={arXiv},
}

🤝 Existing Collaborators and Contributors

The extensive collaborative efforts of Megadetector have genuinely inspired us, and we deeply value its significant contributions to the community. As we continue to advance with Pytorch-Wildlife, our commitment to delivering technical support to our existing partners on MegaDetector remains the same.

Here we list a few of the organizations that have used MegaDetector. We're only listing organizations who have given us permission to refer to them here or have posted publicly about their use of MegaDetector.

We are also building a list of contributors and will release in future updates! Thank you for your efforts!

👉 Full list of organizations

Important

If you would like to be added to this list or have any questions regarding MegaDetector and Pytorch-Wildlife, please email us or join us in our Discord channel: