The model

How does it work?

We refer to leopard re-identification as the process of identifying a particular pride member upon a re-encounter.

Unseen leopards, captured for the first time, are considered out-of-distribution members.

Our model can re-identify and flag out of distribution pride members, facilitating researchers and rangers track their population in the wild.

Input images

Detection

Extraction & Comparator

Spotted leopard

Detection

The state-of-the-art in object detection is a family of models named YOLOv5. We used publicly available images of leopards, giraffes, and hyenas to train a model to detect a leopard's body, head, and flank.

The idea behind this first step is to extract the most relevant parts of a leopard, the same way it's done with humans, gorillas, and other animal detection, to find similarities between the same images of a pride member.

Our model can detect these three objects with high precision (92%).

Extraction

After the three objects are detected, we feed the cropped and resized images to a pre-trained Resnet-18 CNN for feature extraction.

In this step, each object generates an embedding vector which is combined to capture semantic information. Our concept is based on the idea that the most relevant discriminative features can be found in these three objects.

The CNN model is trained by an improved triplet loss function that pulls the instances of the same pride individual closer, while pushing away the instances belonging to a different pride member. The distance between positive and negative triplets is called margin. The larger the margin, the most capability to differentiate individuals is achieved.

Comparator

We used a softmax layer for classification paired with clustering to determine which leopards are out of distribution (OOD). If the distance of the embedding is too far away from any of the cluster centroids (one per class identified), then we classify it as OOD.