Insights and approaches using deep learning to classify wildlife

Zhongqi Miao, Kaitlyn M. Gaynor, Jiayun Wang, Ziwei Liu, Oliver Muellerklein, Mohammad Sadegh Norouzzadeh, Alex McInturff, Rauri C. K. Bowie, Ran Nathan, Stella X. Yu, Wayne M. GetzScientific 2019

Abstract

The implementation of intelligent software to identify and classify objects and individuals in visual fields is a technology of growing importance to operatives in many fields, including wildlife conservation and management. To non-experts, the methods can be abstruse and the results mystifying. Here, in the context of applying cutting edge methods to classify wildlife species from camera-trap data, we shed light on the methods themselves and types of features these methods extract to make efficient identifications and reliable classifications. The current state of the art is to employ convolutional neural networks (CNN) encoded within deep-learning algorithms. We outline these methods and present results obtained in training a CNN to classify 20 African wildlife species with an overall accuracy of 87.5% from a dataset containing 111,467 images. We demonstrate the application of a gradient-weighted class-activation-mapping (Grad-CAM) procedure to extract the most salient pixels in the final convolution layer. We show that these pixels highlight features in particular images that in some cases are similar to those used to train humans to identify these species. Further, we used mutual information methods to identify the neurons in the final convolution layer that consistently respond most strongly across a set of images of one particular species. We then interpret the features in the image where the strongest responses occur, and present dataset biases that were revealed by these extracted features. We also used hierarchical clustering of feature vectors (i.e., the state of the final fully-connected layer in the CNN) associated with each image to produce a visual similarity dendrogram of identified species. Finally, we evaluated the relative unfamiliarity of images that were not part of the training set when these images were one of the 20 species "known" to our CNN in contrast to images of the species that were "unknown" to our CNN.

Introduction

Ecologists increasingly rely on motion-activated camera traps to monitor biodiversity, but the sheer volume of data creates a massive bottleneck. While deep learning has stepped in to automate image classification, these models are often treated as "black boxes." For a researcher, a model that is 90% accurate is useful, but a model that is 90% accurate because it learned to recognize a specific tree behind a Hartebeest—rather than the animal itself—is a liability.

This study utilizes a dataset from Gorongosa National Park, Mozambique, containing 111,467 images. The model was trained on the 20 most abundant species (e.g., baboon, elephant, impala) and tested against 10 rarer "unknown" species (e.g., lion, pangolin) to evaluate its ability to flag unfamiliar animals. This paper seeks to bridge the gap between machine and human perception, providing tools to interpret why a model makes a specific call and how to identify dataset biases that lead to misclassification.

Methods and Interpretability Techniques

The researchers trained a VGG-16 architecture (and later a ResNet-50 for comparison) to classify species. To peer inside the model, they employed several interpretability techniques:

  • Guided Grad-CAM (GG-CAM): A combination of Gradient-weighted Class Activation Mapping (which finds the most "important" pixels) and Guided Back-propagation (which highlights fine-grained textures). This allows researchers to see exactly which pixels (e.g., stripes, horns, or tails) triggered the classification.
  • Mutual Information (MI): The authors used MI to identify specific neurons in the final convolutional layer that consistently responded to a particular species across thousands of images.
  • Hierarchical Clustering: By analyzing the feature vectors from the final fully-connected layer, they built a "visual similarity dendrogram" to see which species the model thinks look alike.
Visualizing model focus using Grad-CAM, Guided Backpropagation (GBP), and Guided Grad-CAM (GG-CAM).

Key Results and Insights

The VGG-16 model achieved an overall accuracy of 87.5%. However, performance varied significantly by species, from a high of 95.2% for Civets to a low of 54.3% for Reedbucks.

Human-Machine Alignment vs. Shortcut Learning

In many cases, the CNN "logic" mirrored human biology. For example, the model focused on the white stripes of a Nyala or the dark snouts and curved tails of Baboons—features humans are also taught to look for. The mean Dice Similarity Coefficient (DSC) between machine-extracted features and human-defined descriptors was 0.69, suggesting a high but imperfect overlap.

The most striking discovery was "shortcut learning," where the model identified species by their habitat rather than their physical traits. For porcupines, the "Top 1" neuron actually responded to palm plants. Because that specific camera location saw many porcupines, the model learned that "Palm Tree = Porcupine." This explains why models often fail when moved to new geographic locations.

Comparison of top-responding neurons for Porcupine (high accuracy) and Reedbuck (low accuracy), illustrating background bias.

Visual Similarity and Detecting the Unknown

The model’s internal "family tree" (dendrogram) grouped animals by visual traits rather than evolutionary ones. It placed "large body-to-appendage" animals like wildebeest and buffalo together, and grouped pig-like mammals (warthog, bushpig, porcupine) regardless of their actual biological families.

Furthermore, the researchers found that "unknown" species generally sat further away in the feature space. By setting an "unfamiliarity threshold" based on the most distinct known species (the elephant), they could successfully flag 7 out of 10 species the model hadn't been trained to recognize.

Conclusion

The authors highlight a significant "labeling protocol" issue: if an image contains both a prominent Impala and a tiny Reedbuck in the background, it might be labeled twice, confusing the CNN. Future work should focus on attention mechanisms that force the model to ignore the background and focus strictly on the animal. Additionally, improving "unfamiliarity" detection could allow models to automatically flag rare species for human review, rather than confidently misclassifying them.

Summary updated

BibTeX
@inproceedings{miao2019insights,
  author = {Zhongqi Miao and Kaitlyn M. Gaynor and Jiayun Wang and Ziwei Liu and Oliver Muellerklein and Mohammad Sadegh Norouzzadeh and Alex McInturff and Rauri C. K. Bowie and Ran Nathan and Stella X. Yu and Wayne M. Getz},
  title = {{Insights and approaches using deep learning to classify wildlife}},
  booktitle = {Scientific},
  year = {2019},
  doi = {10.1038/s41598-019-44565-w},
}
Figure