Repository navigation
Process a Video with FishTrack
This guide describes the normal desktop workflow for processing a video in FishTrack. It assumes that FishTrack and its models are already installed and ready to use.
FishTrack works with recorded MP4 footage. You choose a clip, decide how the fish will be found, choose how they will be tracked, and export a new annotated video.
It helps to have a short test clip in mind rather than beginning with a long run. In particular:
- choose a section where the fish are clearly visible
- begin at a frame where the fish are not heavily obscured
- start with a short interval while testing settings
- remember that Grounding DINO proposes fish only in the starting frame
- remember that Conventional CV and SAM 2 are the tracking methods
When FishTrack opens, the main window brings together the file browser, preview, settings, processing controls and log.
Click Choose folder... and select the folder containing your footage. FishTrack lists the MP4 files directly inside that folder and shows their sizes.
Use Refresh if the folder contents have changed since opening it.
Click the video in the file list. FishTrack shows a preview frame and updates the settings panels for that clip.
At this point, pay attention to the preview image. The selected start time determines the first processed frame, and that first processed frame is where manual selections or automatic fish proposals are made.
If you are looking for a particular fish, it is often worth choosing a start time at which it is already visible and reasonably clear of surrounding coral.
In the Tracking tab, choose the tracking Method:
- Conventional CV follows visual appearance using OpenCV tracking and can acquire fish through motion detection
- SAM 2 predicts a fresh segmentation mask for each fish through the clip
Neither method guarantees correct identity throughout the clip. Conventional CV is lighter and more explainable; SAM 2 can often follow the fish's changing shape more closely.
Still in the Tracking tab, choose Find fish. The usual choices are:
- Automatic proposals — Grounding DINO suggests likely fish boxes in the starting frame
- Manual selection — you draw the starting boxes yourself
- Conventional motion acquisition — available for the conventional backend, using motion rather than manually chosen starting boxes
A recommended first experiment for many clips (rather than a guarantee of your saved desktop preferences) is:
-
Method:
SAM 2 -
Find fish:
Automatic proposals
That combination uses Grounding DINO to propose fish in the first processed frame, lets you review the boxes, then hands the accepted selections to SAM 2 for tracking.
Also in the Tracking tab, set:
- Start (seconds) — where processing begins
- Duration — how much of the clip to process
- Frame limit — an upper bound on processed frames
These settings are especially important because:
- the start time determines the frame used for proposal or manual selection
- SAM 2 requires a bounded run and is limited to 240 decoded frames
- short runs are much quicker when testing settings
For a first experiment, a short interval such as five seconds is often sufficient.
If you are using Automatic proposals, the Grounding DINO tab lets you control how the initial fish proposals are generated.
The most important settings are:
-
Prompt — normally
fish. - Thresholds — making proposals more or less selective
- Maximum proposals — limiting the number of starting boxes
- Review preference — whether proposals should be reviewed before tracking starts
The initial settings are a useful starting point. Grounding DINO proposes candidate boxes; it does not track fish. See Finding Fish for the significance of the proposal scores.
If you are using Conventional CV, the Motion tab exposes settings for motion detection, camera alignment, local motion checks and appearance following.
These controls are mainly for experimentation. For a first pass, it is usually best to leave them at their defaults and inspect the resulting video before changing anything.
Open the Output tab and decide what should be exported.
You can control:
- The output folder and filename
- Whether outlines are drawn
- Whether tracking IDs are shown
- Whether diagnostic boxes are drawn
- Whether diagnostic files are exported
FishTrack always writes a new MP4. It does not overwrite the source file.
If you leave the filename automatic, FishTrack uses a name based on the input file, the finding method and the tracking method, for example, if the input file is reef.mp4:
reef-Auto-SAM2-tracked.mp4
reef-Manual-CV-tracked.mp4
If a generated name already exists, FishTrack adds a numbered alternative. If you provide your own filename explicitly and it already exists, FishTrack refuses to overwrite it.
Click Process video.
FishTrack runs the work in the background so the interface remains responsive. The progress area and processing log update while the run continues. If a reliable percentage is known, FishTrack shows it; otherwise it uses a busy/indeterminate state.
The preview may update to show annotated output frames as they are produced.
If you chose automatic proposals with review enabled, FishTrack opens the review window before tracking begins.
In this window you can:
- Right-click a proposed box to remove it
- Drag to add a new box around a missed fish
- Press Backspace to remove the last selection
- Press Enter or click Track selected fish to accept the selections
- Press Escape or Cancel to abort the run
This step is important because it lets you remove reef features or other incorrect proposals before tracking begins.
While processing continues, keep an eye on:
- The status/progress area
- The processing log
- The preview panel
The log helps explain what FishTrack is doing and can be useful when a result is confusing. For example, it may show model progress, export progress or completion messages.
If you enable diagnostics, FishTrack can also write additional files that help distinguish problems in the initial proposal stage from problems during tracking or export.
When processing finishes, click Open result to play the exported MP4.
The output video:
- Is a separate file from the source
- Retains the decoded clip dimensions and frame rate where successfully exported
- Uses lossy MP4 video encoding
- Contains video only
- Does not copy source audio, subtitles or camera metadata
If the result is not what you expected, try again with a shorter interval or change only one important setting at a time.
Once you have inspected the result, try the same video interval and starting selections with Conventional CV to compare tracking behaviour. Change one parameter at a time so the effect is easier to understand. For an explanation of the two approaches, see Tracking Fish.
If no fish are proposed, the wrong object is followed, tracking stops early, or processing is slower than expected, inspect the log and try a short test interval first.
Useful things to check include:
- Whether the starting frame clearly shows the fish
- Whether the accepted starting boxes are reasonable
- Whether the chosen tracking method suits the experiment
- Whether the selected duration is too long, especially for SAM 2
- Whether a missing model or dependency has been reported
For more detailed help, see Diagnostics and Troubleshooting.