Data from: Machine-assisted image analysis facilitates conservation of iconic elasmobranchs
Data files
Apr 15, 2026 version files 4.03 GB
-
1st-stage-segment-skates.ipynb
13.17 KB
-
2nd_step_in_Rate-A-Skate.ipynb
21.74 KB
-
models.zip
3.92 GB
-
README.md
3.93 KB
-
segmentation.zip
112.94 MB
Abstract
Photo-identification is commonly used in wildlife ecology and management, but its effectiveness depends on a reliable determination of whether an observed individual is already contained within the database. This is typically done by trained human operators, but becomes an increasingly demanding task as photo-ID databases expand, potentially limiting the method’s applicability. Artificial Intelligence (AI) approaches have been suggested as potential solutions to this problem. We present a case study involving a photo-ID database of flapper skate (Dipturus intermedius) from Scotland, which was used to train a multistage, deep learning model, using a method similar to a high-performing facial recognition system, FaceNet, to enable automatic assessment of the similarity between flapper skate newly submitted to the database and those preexisting in the database. Evaluation using a blind test set of 100 images taken from the database, and also a second, smaller test set of tagged animals of known identity to confirm the model’s photo-identification performance for end users. When assessed against the previously unseen test set, the model achieved a mean average precision (MAP) of 84.1% and a top-1 accuracy of 80%. The resulting photo–identification model was integrated into the photo-ID database, which was further tested with images of tagged individuals of known identity. This integration significantly reduced the time required to confirm whether new skates were already included in the database. With a top-1 accuracy of 80%, the matching skate, if contained in the database, will likely be returned as a match, removing the need to check by eye against 2,500+ individuals already in the database. The integration of machine-assisted image analysis into a photo-ID database of skate improved our ability to track individuals and understand movement and residency at far larger scales, essential for the continued management of the species. This approach is suitable for a wide range of research projects reliant on photo-ID and should be considered for new and legacy data sets.
Dataset DOI: 10.5061/dryad.vt4b8gv6p
Description of the data and file structure
This dataset contains Python code for the Rate-A-Skate pipeline with model weights and training data. The Rate-A-Skate pipeline is a multistage, deep learning model trained on a photo-ID database of flapper skate (Dipturus intermedius) from Scotland, using a method similar to high performing facial recognition system, FaceNet, to enable automatic assessment of the similarity between flapper skate newly submitted to the database and those preexisting in the database.
File: 1st-stage-segment-skates.ipynb
Description: 1st stage of Python code for Rate-A-Skate pipeline contained in Jupyter notebook (https://jupyter.org/). This code performs semantic segmentation of flapper skate using a convolutional neural network with a U-net architecture, isolating the skate in an image in preparation for individual recognition. The U-net has been trained and tested on the images and masks contained in 'segmentation.zip', within this dataset and its weights are available in 'models.zip', also available in this dataset.
File: 2nd_step_in_Rate-A-Skate.ipynb
Description: 2nd stage of Python code for Rate-A-Skate pipeline contained in Jupyter notebook (https://jupyter.org/). In this code, a ResNet-101 convolutional neural network is trained with a triplet loss function for individual recognition of flapper skate on a on a photo-ID database of flapper skate (Dipturus intermedius) from Scotland, using a method similar to high performing facial recognition system, FaceNet. The weights for the convolutional neural network are available in 'models.zip', also available in this dataset.
File: segmentation.zip
Description: Training set for segmentation of skate, randomly split into training (60 images) and test (10 images) data. Training set has been hand annotated, created using the Computer Vision Annotation Tool (CVAT). Annotation masks are stored with names matching the associated image, in .png format with the same name as the image, with a value of 0 for the background and 1 for the skate.
Images/annotations to train the semantic segmentation are contained in
Images "segmentation.zip\segmentation\PNGImagesRS"
Annotations "segmentation.zip\segmentation\SegmentationClassRS"
Images/annotations to test the semantic segmentation are contained in
Images "segmentation.zip\segmentation\test_set\JPEGImages_processed"
Annotations "segmentation.zip\segmentation\test_set\SegmentationClass_processed"
File: models.zip
Description: Deep learning model weights for PyTorch deep learning library (for https://pytorch.org/) for 1st and 2nd stages of Rate-A-Skate pipeline contained in files with '.pth' file extension . Information on loading model weights from '.pth' files can be found at (https://docs.pytorch.org/tutorials/beginner/saving_loading_models.html).
For performing semantic segmentation of flapper skate with a convolutional neural network with a U-net architecture and backbone, using the 1st stage of Python code for Rate-A-Skate pipeline, weights can be found in
"models.zip\models\skate-seg-720-2024.pth"
For performing individual re-identification of flapper skate with ResNet-101 convolutional neural network that has been trained with a triplet loss function, using the 2nd stage of Python code for Rate-A-Skate pipeline, weights can be found in
"models.zip\models\07022024-resnet101-improve-seg-b70.pth"
Code/software
Jupyter notebook (https://jupyter.org/) and PyTorch deep learning library (for https://pytorch.org/)
