SharkTrack uses computer vision to detect and track elasmobranchs (sharks & rays) in BRUVS footage and compute species-specific MaxN.
For an in-depth guide, including how the pipeline works and how to review results, visit the SharkTrack Website.
Download the latest release from GitHub Releases (zip file), unzip, and open a terminal in the sharktrack folder.
pip install -r requirements.txtpython app.py --input /path/to/your/videosThat's it! SharkTrack will process every .mp4 in the folder and save detections to ./outputs.
Customise the run with optional flags:
python app.py --input /path/to/videos --conf 0.25 --peek --stereo_prefix L --resume| Flag | Description |
|---|---|
--input |
Path to video folder (processes all .mp4 files recursively) |
--output |
Path to output folder (default: ./outputs) |
--conf |
Detection confidence threshold (default: 0.25) |
--peek |
Fast mode — extracts interesting frames only, no MaxN |
--stereo_prefix |
Only process videos whose filename starts with this prefix |
--chapters |
Aggregate chapter-split videos into one |
--resume |
Skip already-processed videos |
--limit |
Max number of videos to process (default: 1000) |
After processing, classify detections and generate MaxN. See the Annotation Pipeline Guide for detailed instructions, or run:
python utils/compute_maxn.py --path outputsSharkTrack is free and open-source. If you are using it in your research, we'd love to hear from you — it helps us improve SharkTrack and spotlight your work on our website.
If you use SharkTrack, please cite:
@article{varini2024sharktrack,
title={SharkTrack: an accurate, generalisable software for streamlining shark and ray underwater video analysis},
author={Varini, F. and Gayford, J. H. and Jenrette, J. and Witt, M. J. and Garzon, F. and Ferretti, F. and Glocker, B.},
journal={arXiv preprint arXiv:2407.20623},
year={2024}
}This software and related work was supported by the efforts of:
Filippo Varini, Joel H. Gayford, Jeremy Jenrette, Matthew J. Witt, Francesco Garzon, Francesco Ferretti, Sophie Wilday, Mark E. Bond, Michael R. Heithaus, Danielle Robinson, Devon Carter, Najee Gumbs, Vincent Webster, Ben Glocker, Fabio De Sousa Ribeiro, Rajat Rasal, Orlando Timmerman, Natalie Ng, Rui Wen Lim, Michael Sellgren, Lara Tse, Steven Chen, Maria Pia Donrelas, Manfredi Minervini, Xuen Bei (Bay) Chin, Adam Whiting, Aurora Crocini, Gabriele Bai, Stephanie Guerinfor.
- Issues — Open a GitHub Issue (we aim to respond within a week)
- Email — fppvrn@gmail.com
- Contributions — Pull requests, suggestions, and collaborations are welcome. This is part of a broader effort to develop generalisable marine species classifiers — get in touch if you want to get involved in AI-driven ocean conservation.
