The notebook and scripts in this repo utilize Grounded SAM (GroundingDINO + SAM) to segment images of dolphins and use the dorsal fin to find which photos have the same dolphin.
Create a pyhton virtual environment (>= 3.11) and run
pip3 install -r ./requirements.txtIf this fails install the GroundingDINO repo by hand from here.
The first step is processing the images to obtain the masks of the dorsal fins, to do so run batch_process.py, make sure to modify the variables that contain the path to the image and mask directories.
Then, if you wish to match the images with SIFT run the generate_keypoints.py script, this will extract the keypoints from each image and serialize them.
To look for matches between the images use the mathc.ipynb notebook.