Paying Attention to Other Animal Detections Improves Camera Trap Classification Models
Preprint
Abstract
In ecological studies, automated species classification models are increasingly used to process large volumes of camera trap images. Most current classification models rely on a two-step pipeline: a detector first locates and crops animals, followed by a classifier that predicts species independently for each crop. While effective, these models still struggle under challenging conditions and ignore temporal context or information from nearby animals available in sequences of camera trap images, whereas human annotators often use it in difficult cases. We propose to leverage self-attention, a core mechanism of Large Language Models and Vision Transformers, to enable the model to learn relationships between crops occurring in similar contexts. Our self-attention module operates directly on the set of crop embeddings, producing new representations enriched with information from other crops, improving species classification. The module fits into the two-step pipeline without requiring structural change and adds only minimal computational overhead. To address the lack of annotated multi-species sequences, we develop a training strategy that synthetically generates multi-species sequences from monospecific ones. Compared to an independent classifier baseline, our multi-crop model achieves higher accuracy on mono-specific sequences, both real and synthetic. In multispecies settings, evaluated using synthetic test sets, we also observe a substantial improvement in accuracy. Using real but weakly annotated multi-species sequences, we reformulate the task as multi-label set classification, and conduct a visual analysis, to highlight the benefits of our approach. By leveraging the information brought by all detections of animals in the image and others of the same sequence, our approach reduces species misclassifications and enables more accurate estimates for downstream ecological analyses focusing on, for instance, species richness, occupancy, and species interaction.Keywords
All Related Versions
- Published version: Methods in Ecology and Evolution, 17 (4), 1248.
This publication has 32 references indexed in Scilit:
- Addressing significant challenges for animal detection in camera trap images: a novel deep learning-based approachScientific Reports, 2025
- Harnessing artificial intelligence to fill global shortfalls in biodiversity knowledgeNature Reviews Biodiversity, 2025
- CoTracker: It Is Better to Track Together2024
- PanAf20K: A Large Video Dataset for Wild Ape Detection and Behaviour RecognitionInternational Journal of Computer Vision, 2024
- Using the multivariate Hawkes process to study interactions between multiple species from camera trap dataEcology, 2024
- Camtrap DP: an open standard for the FAIR exchange and archiving of camera trap dataRemote Sensing in Ecology and Conservation, 2023
- The DeepFaune initiative: a collaborative effort towards the automatic identification of European fauna in camera trap imagesEuropean Journal of Wildlife Research, 2023
- Perspectives in machine learning for wildlife conservationNature Communications, 2022
- Wildlife Insights: A Platform to Maximize the Potential of Camera Trap and Other Passive Sensor Wildlife Data for the PlanetEnvironmental Conservation, 2019
- Snapshot Serengeti, high-frequency annotated camera trap images of 40 mammalian species in an African savannaScientific Data, 2015