SciPy 2025

Zamba: Computer vision for wildlife conservation
07-10, 15:50–16:20 (US/Pacific), Ballroom

Camera traps are an essential tool for wildlife research. Zamba is an open source Python package that leverages machine learning and computer vision to automate time-intensive processing tasks for wildlife camera trap data. This talk will dive into Zamba's capabilities and key factors that influenced its design and development. Topics will include the importance of code-free custom model training, Zamba’s origins in an open machine learning competition, and the technical challenges of processing video data. Attendees will walk away with a better understanding of how machine learning and Python tools can support conservation efforts.


Motivation

The conservation sector has embraced camera traps as a core technology to enable measures of species occupancy, relative or absolute abundance, population trends over time, patterns in animal behavior, and more. While the downstream uses of camera traps vary, all camera trap users share a common pain point: camera traps cannot automatically label and filter the species they observe. It therefore takes the valuable time of teams of experts, or thousands of citizen scientists, to manually process this data and identify videos and images of interest.

Automated, accurate, and accessible species detection unlocks improved monitoring of animal populations and evaluation of the impacts of conservation efforts on species abundance. Faster processing of camera trap data means that conservationists can do these assessments in months rather than waiting years for their results. This enables both faster conservation interventions as well as faster evaluation of conservation measures, enabling a course change if something is not proving effective. It also supports conservationists in collecting more images and from more locations.

Methods

Zamba is an open source Python package that leverages machine learning and computer vision to automate time-intensive processing tasks for wildlife camera trap videos and images. It allows conservationists to direct their time toward more complex secondary analysis and making evidence-based conservation decisions.

In this talk, we will cover:

  • Zamba’s origins in the winning approaches from the Pri-matrix Factorization machine learning challenge, hosted by DrivenData, and how crowdsourcing top methodologies can kickstart the development of such tools.
  • An overview of Zamba's capabilities for processing camera trap images and videos and how machine learning supports conservation use cases.
  • Why videos are a much more difficult data modality to process than images and how Zamba approaches this with multi-stage processing and a student–teacher model.
  • The importance of custom model training functionality for handling the wide variety of habitats and species under study by conservation efforts around the world.
  • How designing for conservationists, who aren't programmers and shouldn't need to be, led to the development of Zamba Cloud, a web service (also developed with Python) that provides a code-free interface to Zamba's machine learning capabilities.

Results

Zamba has pretrained models for species classification, depth estimation, and blank removal. In addition, users can train custom models using their own labeled data to identify species in their particular habitats.

Zamba’s base image model was trained on over 10 million camera trap images from lila.science capturing 178 species groupings. The video models were trained on over 250,000 expert-labeled videos from 14 countries in West, Central, and East Africa capturing 30 species (as well as blanks and humans).

Using a holdout set of 30,000 videos, we found a top-1 accuracy of 82% and a top-3 accuracy of 94% for the species classification models. Using the blank detection model, a true positive rate of 80% for blank detection can be achieved with a 10% false negative rate.

To date, over 300 users from around the globe have used Zamba Cloud to process more than 1.1 million videos.

Emily Dorne is a lead data scientist at DrivenData where she develops machine learning models for social impact. Her expertise lies in classifying animals in camera trap videos to support conservationists, identifying harmful algal blooms to support water quality managers, and helping data scientists consider the ethical implications of their work. She is passionate about using data for social good and has previously worked at the Gates Foundation, Stanford Center for International Development, and the Brookings Institution.

Jay Qi is a lead data scientist at DrivenData where he helps mission-driven organizations and institutions leverage machine learning, data science, and data engineering for social impact. He has worked on applying machine learning to a wide range of scientific contexts, including hydrological modeling, spacecraft dynamics, and wildlife conservation. Before DrivenData, Jay modeled failures of industrial machines using sensor data at Uptake, and he has a background in aerospace engineering and computational fluid dynamics. Jay is also an active open source software maintainer and contributor, working on projects including cookiecutter-data-science, cloudpathlib, and erdantic.