Skip to content

Finding Fish

Dave Walker edited this page Nov 1, 2026 · 2 revisions

Before FishTrack can follow a fish, it needs a starting region. A region of interest (ROI) is simply a rectangular area in a video frame that identifies the animal or other object you want to follow.

Grounding DINO proposal and review

Automatic Proposals: Grounding DINO

Grounding DINO examines only the first processed frame using a text description, normally fish.. It looks for objects that appear to match that description and suggests rectangular regions around possible matches. The proposals are a starting point, not a final decision about which fish to follow.

The default workflow opens a review window. You can remove an incorrect rectangle, draw one around a missed fish, and accept the final selection. If Grounding DINO finds nothing, you can still add regions manually. Previously specified manual regions can also be included in the review. The accepted regions then start tracking using either Conventional CV or SAM 2.

Suggestions may include reef features or omit distant, camouflaged and partially hidden fish. A species name in a prompt does not guarantee correct species recognition. The detector assigns scores to its proposals, but these are ranking signals, not calibrated probabilities that a rectangle really contains a fish.

How Proposals are Prepared

Behind the scenes, FishTrack tidies up the detector's suggestions before showing them. Rectangles are kept within the image boundaries; invalid results and boxes smaller than eight pixels in either dimension are discarded. If two proposals overlap substantially, FishTrack normally retains the higher-ranked one. Specifically, proposals with an intersection-over-union (a measure of overlap) greater than 0.5 are treated as duplicates.

The documented model variant for automatic proposals is Grounding DINO Tiny, downloaded from IDEA-Research/grounding-dino-tiny into models/grounding-dino-tiny. Its weights are approximately 700 MB. The documented setup pins model revision a2bb814dd30d776dcf7e30523b00659f4f141c71 and uses the safer safetensors weight format. Once installed, the model is loaded locally; footage does not need to be uploaded for detection. FishTrack lowercases the text prompt and adds a final period if needed.

Proposal Settings

The desktop interface exposes the principal Grounding DINO controls, including the prompt, score thresholds, processing device and maximum number of proposals. Automatic review and automatic acceptance are separate choices. For exact command-line option names and defaults, see Settings and Configuration.

Automatic acceptance is deliberately optional: when using --auto-roi --accept-auto-roi without a review window, an empty proposal set causes the run to fail rather than silently track nothing. For unfamiliar footage, reviewing proposals is generally the better approach.

If diagnostics are enabled, FishTrack can save roi-proposals.json (original suggestions and scores), roi-proposals.jpg (a labelled preview) and selected-rois.json (the regions actually accepted). These help distinguish a poor initial selection from a tracking failure later on. See Diagnostics and Troubleshooting.

Note: Grounding DINO does not keep searching throughout the clip. It makes proposals once, on the chosen starting frame. A fish appearing later will not trigger a new Grounding DINO proposal.

🦖 Why is it called Grounding DINO?

Despite the name, no dinosaurs are involved! Grounding refers to visual grounding: connecting a natural-language description (such as "a fish") to the corresponding objects in an image while DINO stands for Detection with Improved deNoising anchOr boxes — an acronym that required a little creative licence from its inventors!

Grounding DINO combines object detection with language understanding, allowing FishTrack to locate fish using text prompts rather than relying on a fixed set of predefined object categories.

So the name is technically meaningful, even if it sounds more like something from Jurassic Park than a computer-vision research paper. 🦕

Manual Selection

Draw a tight rectangle around a fish on the starting frame. Avoid including unnecessary coral or background: a conventional appearance tracker may learn the background instead of the animal. Multiple fish can be selected; acceptance order assigns initial track IDs.

Manual selection can be used instead of automatic proposals or to correct them during review.

Conventional Motion Acquisition

Conventional CV can also discover moving candidates from frame differences and optical flow, without DINO or manually supplied boxes. Once a fish has been acquired, the Conventional CV backend can follow its appearance between frames using OpenCV's CSRT tracker.

Its motion checks can also acquire additional objects during processing, without running Grounding DINO again.

Camera movement, slow fish and moving reef features can confuse this process; see Tracking Fish for the tracking algorithm and its limitations.

For further detail, see Tracking Fish.

A Few Decisions that Matter

  • Begin at a frame where the fish is fully visible if possible.
  • Prefer one or two good starting regions over many questionable ones for initial tests.
  • Use review rather than automatically accepting every model proposal when inspecting new footage.
  • Remember that reviewed Grounding DINO proposals can start either Conventional CV or SAM 2 tracking in the current desktop app.

Conventional CV can optionally acquire additional moving objects during processing using its separate motion detector; this does not mean Grounding DINO runs again. See Tracking Fish.

Clone this wiki locally