Photographing Sharks for Individual Identification with Computer Vision

Did you know that by photographing a shark you can directly contribute to better understanding and protecting these amazing animals?

Taking the perfect ID photo

If you spot a shark on a dive and have the opportunity to take an ID picture please do. However please focus foremost on ensuring that you have a good encounter with the animal and that you are following the recommended code of conduct.

The most useful area of the shark for a positive ID is the dorsal surface. A top-down photo where the back of the shark fills as much of the frame as possible works best. But if possible, take as many photos as you can from several different angles.


Species identification is fairly easy to do by eye, but we trained a computer vision model to detect the species in an image. This detection step also identifies where in the image the shark is; a crucial step for identifying the region of the image to match! For the moment this step is performed in batches on a local machine, but we plan to automate this step when resources become available.


Each feature detected for an encounter is then run through a matching step which uses Hessian Affine detection and Scale Invariant Feature Transform description to identify and describe regions of the individual pattern that can be used for matching. Just like a fingerprint! Local Naive Bayes Nearest Neighbor identification is then used to match this region of interest against regions identified in other encounters. This step is also performed locally to reduce server costs, but automation is planned for the future!