Repository navigation
Home
FishTrack is an experimental desktop application for finding and following fish in recorded underwater video. It was developed using reef footage where the camera moves, fish cross complex backgrounds, and animals can turn or disappear behind coral.
FishTrack can propose fish in a chosen starting frame, let you select them manually, and follow accepted regions using conventional computer vision or SAM 2. It produces a separate annotated MP4 showing the results. The original video is not changed.
A reef can look almost still in a single photograph. In moving footage, the scene is anything but still: fish turn and cross one another, coral fills the background, the camera pans as the observer swims, light and suspended material shift through the water.
A camera carried by a swimmer rarely remains completely still. A sideways movement makes much of the reef seem to travel across the image. Different coral structures sit at different distances, so they may appear to move by different amounts — an effect called parallax. Suspended particles and changes in illumination complicate matters further.
In conventional motion detection, differences between consecutive frames can suggest where movement occurred. But such differences do not automatically distinguish a fish from a moving camera, vegetation or light rippling over coral.
Following a particular fish is therefore surprisingly difficult. Even when it is obvious to a human that a fish is moving, a computer must decide which part of the image belongs to the fish, where that region has moved, and whether a region in the next frame represents the same individual.
Detection asks where is something? Grounding DINO is a text-guided detector. Given a description such as fish., it examines the initial video frame for objects that appear to match that description, then draws rectangular regions of interest around possible matches. These are suggestions rather than confirmed detections, so the user can review and adjust them before tracking begins.
Tracking asks where did it go? A conventional tracker may follow a region's visual appearance and predicted motion, while SAM 2 maintains a video prediction for a selected object.
Segmentation asks which pixels appear to belong to it? SAM 2 produces a mask, an image-like map separating its predicted object region from the surroundings. A mask is not inherently a verified biological boundary.
A fish may disappear behind coral, turn so that its appearance changes, or pass near another similar fish. A method may follow the wrong object, lose the track, or continue drawing an inaccurate region. These are not necessarily obvious in an attractive annotated video.
FishTrack makes these competing methods available for experimentation rather than assuming any one of them solves the problem.
- Installation and Development Environment explains how to set up and launch FishTrack.
- Process a Video with FishTrack walks through a complete desktop processing run.
- Finding Fish describes Grounding DINO proposals, manual selections and motion-based acquisition.
- Tracking Fish explains Conventional CV and SAM 2, including when to try each method.
- Settings and Configuration provides the GUI settings overview and CLI reference.
- Diagnostics and Troubleshooting explains how to investigate problems and read diagnostic outputs.
- Architecture and Processing Pipeline outlines the internal components and execution sequence.
FishTrack is a tool for exploration and visual annotation, not a validated system for estimating populations, measuring fish speed, or identifying species. A convincing-looking outline is still a model or algorithm output; it does not prove that the same animal has been followed correctly.
The application source code is distributed under the repository's MIT licence. Example underwater footage may be distributed separately under Creative Commons Attribution 4.0 International (CC BY 4.0); check the licence in the example-video folder and credit the footage creator accordingly. The footage licence does not replace the code licence.