Robust Re-identification of Manta Rays from Natural Markings by Learning Pose Invariant Embeddings

Olga Moskvyak, Frederic Maire, Asia O. Armstrong, Feras Dayoub, Mahsa Baktashmotlagh

This paper presents a deep learning system for the automated re-identification of individual animals, such as manta rays and humpback whales, using their unique natural markings. By training a Convolutional Neural Network (CNN) to map images into a pose-invariant embedding space using triplet loss, the authors achieve over 95% top-10 accuracy, even when dealing with challenging, unaligned photos from citizen scientists.

What Problem Does This Paper Address?

Wildlife conservation relies heavily on "mark-recapture" studies to track population dynamics. For species like manta rays, which have unique spot patterns on their bellies, photo-identification is a powerful non-invasive tool. However, existing automated systems often require high-quality images taken from specific angles (e.g., perpendicular to the animal) and manual alignment by experts.

This creates a bottleneck. Citizen scientists provide a wealth of data, but their photos are often taken at oblique angles, in murky water, or with partial occlusions. The authors aim to bridge this gap by developing a robust, automated system that can handle these real-world variations without requiring retraining for every new individual added to the database.

Methods

The authors adapt state-of-the-art face recognition techniques to the domain of animal markings. Their pipeline consists of:

  1. CNN Embeddings: They utilize deep CNNs (comparing InceptionV3 and MobileNetV2) to extract features and map images into a 256-dimensional embedding space.
  2. Triplet Loss & Mining: The network is optimized using a triplet loss function. This encourages the model to place embeddings of the same individual close together while pushing different individuals further apart. To make training efficient, they use an online semi-hard triplet mining strategy, focusing on the most informative examples during each batch. The triplet loss function encourages same-individual embeddings to be closer than different-individual ones by at least a margin $m$.

  3. Pose Invariance: To handle varying camera angles, they employ extensive data augmentation (rotations up to 90°, flips, and shifts) and use a global average pooling layer, which helps the network ignore spatial positioning and focus on the patterns themselves.

  4. Inference: Once trained, the system identifies a new "query" image by computing its embedding and finding the $k$ nearest neighbors in the existing database. The system architecture includes a learning phase to train the CNN and a prediction phase to match new images using a k-nearest neighbors classifier.
The triplet loss function encourages same-individual embeddings to be closer than different-individual ones by at least a margin $m$.
Fig. 2. The camera angle can vary dramatically. Here the same manta ray, named Eris, was photographed from two different viewpoints. A homography transformation is required to align the belly patterns of the two images. Photo credit: Chris Garraway.

Datasets

The system was evaluated on two distinct datasets:

  • Manta Ray Belly Patterns: Sourced from Project Manta, containing 1,730 images of 120 individuals. This dataset is particularly challenging due to extreme viewpoint variations. Manta ray patterns can look very different depending on the camera angle.

  • Humpback Whale Flukes: Sourced from Happy Whale, containing 2,908 images of 633 individuals. The primary challenge here is the low number of sightings per individual.

Manta ray patterns can look very different depending on the camera angle.

Key Insights and Ideas

  • Generalization to Unseen Individuals: Unlike standard classification models, this embedding-based approach doesn't need to be retrained when a new animal is discovered. It learns a general "similarity metric" for markings.
  • The Power of Augmentation: The authors found that "extensive" augmentation (full rotations and flips) was critical. Without it, top-1 accuracy dropped significantly, proving that the network learns pose invariance through exposure to varied synthetic views.
  • Normalization Nuance: Interestingly, the authors found that not normalizing the embeddings to a unit hypersphere (a common practice in face recognition) actually improved their results.
  • Species-Agnosticism: The same architecture worked well for both manta rays and whales, suggesting the method is generic for any animal with high-contrast natural markings.

Key Results

The proposed system met the "gold standard" for practical use by marine biologists (95% top-10 accuracy):

  • Manta Rays: Achieved a 97.03% top-10 accuracy and 62.05% top-1 accuracy.
  • Humpback Whales: Achieved a 93.46% top-10 accuracy and 62.78% top-1 accuracy.
  • Robustness: Qualitative analysis via t-SNE plots showed that images of the same individual clustered together despite significant differences in lighting, distance, and viewing angle.
  • Database Size: Accuracy scales with the number of reference images. Top-1 accuracy jumped from ~45% with one reference image to over 80% when five reference images were available in the database.

Limitations and Future Work

  • Manual Pre-processing: The system currently requires users to manually draw a bounding box around the pattern of interest. Users must currently provide a bounding box to crop the image to the pattern area.

  • Future Automation: The authors suggest that future iterations could automate this step by training the network on auxiliary tasks, such as predicting the location of anatomical landmarks (e.g., wing tips or gills).

  • Sparse Patterns: The system struggled slightly with "sparse" patterns (few dots), where embeddings for different individuals sometimes mixed in the feature space.
Users must currently provide a bounding box to crop the image to the pattern area.

Summary updated

BibTeX
@inproceedings{moskvyak2019robust,
  author = {Olga Moskvyak and Frederic Maire and Asia O. Armstrong and Feras Dayoub and Mahsa Baktashmotlagh},
  title = {{Robust Re-identification of Manta Rays from Natural Markings by Learning Pose Invariant Embeddings}},
  booktitle = {DICTA},
  year = {2019},
  doi = {10.1109/dicta52665.2021.9647359},
}
Figure