Data, Dataset and Code Repository for AI-based shrimp fingerprinting study

Loading...
Thumbnail Image

Advisors/Reviewers

Further Contributors

Contributing Institutions

Publisher

Journal Title

Journal ISSN

Volume Title

Publisher

Quotable link

DOI:
https://doi.org/10.22029/jlupub-20918

Abstract

This repository contains python code that benchmarks local feature–based matching models against a classic computer vision baseline for shrimp re-identification across moulting events. The objective is to evaluate whether modern feature extractors and matchers can reliably re-identify the same shrimp before and after a moult. Each method is evaluated using two main criteria: • Re-identification accuracy • Percentage of shrimps correctly matched between moults. • Computational efficiency • Runtime per image pair and GPU usage. ***Repository structure** The repository is organized by method, with each folder containing a standalone fingerprinting pipeline: • d2-net/ – D2-Net feature extraction and shrimp fingerprinting pipeline • LoFTR/ – LoFTR-based matching pipeline • LightGlue/ – LightGlue + SuperPoint pipeline • SuperGluePretrainedNetwork/ – SuperGlue + SuperPoint pipeline • EDM/ – EDM model code and fingerprinting pipeline • xfeat/ – XFeat pipeline and training utilities • SIFT_OCV/ – SIFT baseline implemented using OpenCV Additional folders: • database/ – ROI cropped imaged dataset , organized by moult stage and shrimp ID • results/ – Output folders for each matching method • Stats/ – Jupyter notebooks, plots, and summary tables for analysis **Dataset layout** The dataset structure is: • database/moult1//*.jpg • database/moult2//*.jpg Notes: • Each directory may contain multiple images. • Each shrimp ID is treated as a class. • The scripts perform class-to-class matching, linking shrimp from moult 1 to moult 2. **Setup** 1. Create a Python 3.10 environment. 2. Install dependencies: 3. pip install -r requirements.txt 4. (Optional) Install a CUDA-enabled PyTorch build for GPU acceleration. The original setup used PyTorch 2.0.1 with CUDA 11.7. 5. Activate the virtual environment (venv). **Running the experiments** Each method has its own standalone script, with a configuration block at the top. Paths can be updated directly in the script. Example commands: SIFT • python SIFT_OCV/SIFT_OCV_fingerpritning.py LightGlue • python LightGlue/lightGlue_fingerprint.py LoFTR • python LoFTR/LoFTR_fingerprinting.py SuperGlue • python SuperGluePretrainedNetwork/superglue_fingerprinting.py D2-Net • python d2-net/D2-net_fingerprint.py EDM • python EDM/EDM_fingerprint.py XFeat • python xfeat/Xfeat.py **Outputs** Each method writes its results to a dedicated output folder, including: • score_matrix.csv – Class-to-class similarity matrix • mapping.csv – Hungarian assignment results with inlier counts and match rates • matched_keypoints.csv – Inlier correspondences for the best image pair per assigned class • vis/ – Visualizations of inlier matches after RANSAC filtering • run_resource_report.txt – Runtime statistics and GPU usage **Analysis and visualization** The Stats/ folder contains Jupyter notebooks that: • Aggregates results across all methods • Computes re-identification accuracy and efficiency metrics • Generates plots and CSV summary tables used in the final analysis

Link to publications or other datasets

Description

Notes

Original publication in

Original publication in

Anthology

Collections

URI of original publication

Forschungsdaten

Series

Citation