...helping conservation biologists spend less time doing boring things with camera trap images.
MegaDetector is an AI model that identifies animals, people, and vehicles in camera trap images (which also makes it useful for eliminating blank images). This model is trained on several million images from a variety of ecosystems.
Here's a “teaser” image of what MegaDetector output looks like:
Image credit University of Washington.
MegaDetector is just one of many tools that aims to make conservation biologists more efficient with AI. If you want to learn about other ways to use AI to accelerate camera trap workflows, check out our of the field, affectionately titled “Everything I know about machine learning and camera traps”.
We work with ecologists all over the world to help them spend less time annotating images and more time thinking about conservation. You can read a little more about how this works on our getting started with MegaDetector page.
Here are a few of the organizations that have used MegaDetector... we're only listing organizations who (a) we know about and (b) have given us permission to refer to them here (or have posted publicly about their use of MegaDetector), so if you're using MegaDetector or other tools from this repo and would like to be added to this list, email us!
Canadian Parks and Wilderness Society (CPAWS) Northern Alberta Chapter
Applied Conservation Macro Ecology Lab, University of Victoria
Banff National Park Resource Conservation, Parks Canada
Blumstein Lab, UCLA
Borderlands Research Institute, Sul Ross State University
Capitol Reef National Park / Utah Valley University
Canyon Critters Project, University of Georgia
Center for Biodiversity and Conservation, American Museum of Natural History
Centre for Ecosystem Science, UNSW Sydney
Cross-Cultural Ecology Lab, Macquarie University
DC Cat Count, led by the Humane Rescue Alliance
Department of Fish and Wildlife Sciences, University of Idaho
Department of Society & Conservation, W.A. Franke College of Forestry & Conservation, University of Montana
Department of Wildlife Ecology and Conservation, University of Florida
Ecology and Conservation of Amazonian Vertebrates Research Group, Federal University of Amapá
Gola Forest Programme, Royal Society for the Protection of Birds (RSPB)
Graeme Shannon's Research Group, Bangor University
Grizzly Bear Recovery Program, U.S. Fish & Wildlife Service
Hamaarag, The Steinhardt Museum of Natural History, Tel Aviv University
Institut des Science de la Forêt Tempérée (ISFORT), Université du Québec en Outaouais
Lab of Dr. Bilal Habib, the Wildlife Institute of India
Landscape Ecology Lab, Concordia University
Mammal Spatial Ecology and Conservation Lab, Washington State University
McLoughlin Lab in Population Ecology, University of Saskatchewan
National Wildlife Refuge System, Southwest Region, U.S. Fish & Wildlife Service
Northern Great Plains Program, Smithsonian
Polar Ecology Group, University of Gdansk
Quantitative Ecology Lab, University of Washington
San Diego Field Station, U.S. Geological Survey
Santa Monica Mountains Recreation Area, National Park Service
Seattle Urban Carnivore Project, Woodland Park Zoo
Serra dos Órgãos National Park, ICMBio
Snapshot USA, Smithsonian
TROPECOLNET project, Museo Nacional de Ciencias Naturales
Wildlife Coexistence Lab, University of British Columbia
Wildlife Research, Oregon Department of Fish and Wildlife
Wildlife Division, Michigan Department of Natural Resources
Department of Ecology, TU Berlin
Ghost Cat Analytics
Protected Areas Unit, Canadian Wildlife Service
Conservation and Restoration Science Branch, New South Wales Department of Climate Change, Energy, the Environment and Water
School of Natural Sciences, University of Tasmania (story)
Kenai National Wildlife Refuge, U.S. Fish & Wildlife Service (story)
Australian Wildlife Conservancy (blog posts 1, 2, 3)
Island Conservation (blog posts 1,2) (video)
Alberta Biodiversity Monitoring Institute (ABMI) (WildTrax platform) (blog posts 1,2)
Shan Shui Conservation Center (blog post) (translated blog post) (Web demo)
Endangered Landscapes and Seascapes Programme, Cambridge Conservation Initiative (blog post)
Road Ecology Center, University of California, Davis (Wildlife Observer Network platform)
The Nature Conservancy in California (Animl platform) (story)
Also see:
The list of MD-related GUIs, platforms, and GitHub repos within the MegaDetector User Guide
Peter's map of EcoAssist users (who are also MegaDetector users!)
The list of papers tagged "MegaDetector" on our list of papers about ML and camera traps
MegaDetector was initially developed by the Microsoft AI for Earth program; this repo was forked from the microsoft/cameratraps repo and is maintained by the original MegaDetector developers (who are no longer at Microsoft, but are absolutely fantastically eternally grateful to Microsoft for the investment and commitment that made MegaDetector happen). If you're interested in MD's history, see the downloading the model section in the MegaDetector User Guide to learn about the history of MegaDetector releases, and the can you share the training data? section to learn about the training data used in each of those releases.
The core functionality provided in this repo is:
This repo does not host the data used to train MegaDetector, but we work with our collaborators to make data and annotations available whenever possible on lila.science. See the MegaDetector training data section to learn more about the data used to train MegaDetector.
This repo is organized into the following folders...
Code for running models, especially MegaDetector.
Code for common operations one might do after running MegaDetector, e.g. generating preview pages to summarize your results, separating images into different folders based on AI results, or converting results to a different format.
Small utility functions for string manipulation, filename manipulation, downloading files from URLs, etc.
Tools for visualizing images with ground truth and/or predicted bounding boxes.
Code for:
Code for hosting our models as an API, either for synchronous operation (i.e., for real-time inference) or as a batch process (for large biodiversity surveys).
Experimental code for training species classifiers on new data sets, generally trained on MegaDetector crops. Currently the main pipeline described in this folder relies on a large database of labeled images that is not publicly available; therefore, this folder is not yet set up to facilitate training of your own classifiers. However, it is useful for users of the classifiers that we train, and contains some useful starting points if you are going to take a "DIY" approach to training classifiers on cropped images.
All that said, here's another "teaser image" of what you get at the end of training and running a classifier:
Image credit University of Minnesota, from the Snapshot Safari program.
Code to facilitate mapping data-set-specific category names (e.g. "lion", which means very different things in Idaho vs. South Africa) to a standard taxonomy.
Environment files... specifically .yml files for mamba/conda environments (these are what we recommend in our MegaDetector User Guide), and a requirements.txt for the pip-inclined.
Media used in documentation.
Old code that we didn't quite want to delete, but is basically obsolete.
Random things that don't fit in any other directory, but aren't quite deprecated. Mostly postprocessing scripts that were built for a single use case but could potentially be useful in the future.
A handful of images from LILA that facilitate testing and debugging.
For questions about this repo, contact cameratraps@lila.science.
You can also chat with us and the broader camera trap AI community on the AI for Conservation forum at WILDLABS or the AI for Conservation Slack group.
Image credit USDA, from the NACTI data set.
You will find lots more gratuitous camera trap pictures sprinkled about this repo. It's like a scavenger hunt.
This repository is licensed with the MIT license.
Code written on or before April 28, 2023 is copyright Microsoft.
This project welcomes contributions, as pull requests, issues, or suggestions by email. We have a list of issues that we're hoping to address, many of which would be good starting points for new contributors. We also depend on other open-source tools that help users run MegaDetector (e.g. EcoAssist and CamTrap Detector) and work with MegaDetector results (e.g. Timelapse); if you are looking to get involved in GUI development, reach out to the developers of those tools as well!
If you are interesting in getting involved in the conservation technology space, and MegaDetector just happens to be the first page you landed on, and none of our open issues are getting you fired up, don't fret! Head over to the WILDLABS discussion forums and let the community know you're a developer looking to get involved. Someone needs your help!