Deep in the Jungle: Towards Automating Chimpanzee Population Estimation

Tom Raynes, Otto Brookes, Timm Haucke, Lukas Bösch, Anne-Sophie Crunchant, Hjalmar Kühl, Sara Beery, Majid Mirmehdi, Tilo Burghardt

TL;DR

This paper introduces an automated pipeline for estimating wild animal populations by integrating computer vision-based monocular depth estimation (MDE) directly into ecological camera trap workflows. Tested on a real-world dataset of wild chimpanzees, the approach slashes data processing times from weeks of manual labor to hours of computation while delivering population density estimates within 22% of traditional expert-derived methods.

What Problem Does This Paper Address?

Accurately monitoring great ape populations is vital for conservation, but traditional field surveys are costly and difficult to scale. While motion-triggered camera traps have become the standard tool for gathering wildlife data, analyzing the resulting massive video corpora remains a major bottleneck.

To calculate population density and abundance without identifying individual animals, ecologists rely on frameworks like Camera Trap Distance Sampling (CTDS). CTDS requires precise measurements of the distance from the camera to the animal at the moment of detection. Currently, obtaining these measurements requires human experts to manually compare video frames against physical calibration markers placed in the habitat—a process that is tedious, subjective, and entirely unscalable. This paper addresses the challenge of automating this distance estimation step using deep learning.

Methods

The authors design and evaluate a modular, AI-driven CTDS pipeline that processes raw camera trap footage into downstream ecological statistics.

Fig. 1. Overview of Proposed Approach. (1) Frames containing calibration mark- ers at known distances, and (2) habitat frames sampled from motion-triggered camera trap videos, are (3) passed to MegaDetector and SAM to localise and segment content of interest. These are then processed via (4) monocular depth estimation, utilising the approach of Haucke et al. [10], to yield raw depth maps of observations. The frame- work further combines (5) calibrated metric depth maps with the raw data to produce (6) distance estimates for all detected chimpanzees. These estimates are combined with camera trap metadata (spatial and temporal) and statistically processed to yield (7) density and abundance estimates using the CTDS statistical framework. Overall, this pipeline streamlines camera trap distance sampling from days or weeks of manual labour to hours of computation.

The pipeline consists of the following stages:

  1. Localization & Segmentation: Animals are detected using MegaDetector, and their bounding boxes are refined into precise instance masks using the Segment Anything Model (SAM).
  2. Monocular Depth Estimation (MDE): The authors test two prominent MDE architectures to predict relative depth maps: Dense Prediction Transformers (DPT) and Depth Anything (DA).
  3. Metric Calibration: Relative depth maps are converted into absolute metric distances using site-specific reference videos of a surveyor standing at known distances.
  4. Distance Sampling & Statistical Modeling: The calculated distances are fed into standard CTDS statistical models to fit a detection function and infer final population density and abundance.

The study systematically compares two spatial representations for distance extraction: Bounding Boxes (BBOX, where distance is defined as the 20th percentile of depth values within the box) and Segmentation Masks (SEG, where distance is sampled from the mask's geometric center).

Datasets

The pipeline was evaluated on a challenging, real-world dataset provided by the Wild Chimpanzee Foundation (WCF):

  • Videos: 220 motion-triggered videos capturing wild chimpanzees under unconstrained conditions (varying illumination, heavy occlusion, and background clutter).
  • Locations: 65 fixed camera trap sites across Taï National Park, Côte d’Ivoire—one of West Africa's largest remaining primary rainforests.
  • Ground Truth: Expert annotations detailing temporal metadata and manually calculated animal-to-camera distances, alongside site-specific calibration videos spanning up to 15 meters.

Key Insights and Ideas

  • The Downstream Bias Paradox: Both MDE models systematically compress the depth scale, leading to an overestimation of animal distances at mid-to-long ranges. In the CTDS framework, overestimating distances artificially flattens the calculated detection probability curve. Because this probability sits in the denominator of the density estimator, systematic distance overestimation mathematically causes an underestimation of the final population.
  • DPT Outperforms Depth Anything: Even though Depth Anything generates visually crisper depth maps with finer spatial contours, the calibrated DPT model consistently achieved superior absolute distance accuracy and provided more reliable downstream population estimates.
  • Boxes vs. Masks: Bounding boxes frequently capture foreground clutter (like leaves and branches), biasing distance estimates downward. Precise segmentation masks isolate the animal, significantly improving accuracy at close ranges (< 2m) and under partial occlusion. However, segmentation remains highly sensitive to environmental factors like lens moisture or jungle haze.
Fig. 2. Chimpanzee Distance Estimation Performance by Distance. Graphs showing both individual (bottom) and mean (top) modelled distance estimates mapped to their corresponding manual estimates for all configurations. The blue dotted line shows the fitted regression line. The red dashed line shows the ideal (i.e., model=manual). The error bars show the 25–75 (green) and 5–95 (purple) percentiles (best viewed zoomed). There is a reasonable correlation between manual and modelled distance, although the level of correlation varies.

Key Results

  • Distance Accuracy: The DPT + SEG configuration achieved the highest precision, yielding a Mean Absolute Error (MAE) of 1.70 meters and a Root Mean Squared Error (RMSE) of 2.45 meters against expert ground truth.
  • Population Estimation: Under a semi-automated setup (using human-verified frames), the DPT-based pipelines successfully generated population density and abundance estimates within 22% of traditional manual workflows, falling well within standard ecological uncertainty bounds.
  • The Detection Bottleneck: Under full automation, MegaDetector missed roughly 36.77% (~1,100 instances) of chimpanzees. This high false-negative rate, caused by dense rainforest foliage, was identified as the primary driver of population underestimation in fully automated deployments.

Limitations and Future Work

While this study proves that MDE-driven distance sampling is a viable alternative to manual annotation, two main hurdles prevent fully hands-off deployment:

  1. Forest Occlusion & Detection Failures: Standard object detectors struggle in dense, multi-layered jungle environments. Future work must incorporate temporal context (e.g., tracking animals across video frames rather than analyzing single static frames) to minimize missed detections.
  2. Model Biases: Current MDE models are trained predominantly on open, indoor, or urban datasets. Developing depth estimation models explicitly trained on or adapted to complex, highly textured forest environments will be crucial for eliminating systematic distance biases.

Summary updated

BibTeX
@inproceedings{raynes2026deep,
  author = {Tom Raynes and Otto Brookes and Timm Haucke and Lukas Bösch and Anne-Sophie Crunchant and Hjalmar Kühl and Sara Beery and Majid Mirmehdi and Tilo Burghardt},
  title = {{Deep in the Jungle: Towards Automating Chimpanzee Population Estimation}},
  booktitle = {ICPR},
  year = {2026},
  doi = {10.1007/978-3-032-31933-3\_10},
}
Figure