--- title: Molmo2Fish Tracking emoji: ๐ŸŸ colorFrom: purple colorTo: blue sdk: gradio sdk_version: 6.15.1 app_file: app.py short_description: Track fish in sonar video, fix it with plain English python_version: "3.12" startup_duration_timeout: 1h --- # ๐ŸŸ Molmo2Fish โ€” interactive fish tracking with natural language guidance Demo of [**tidalove/Molmo2Fish**](https://huggingface.co/tidalove/Molmo2Fish), the model from *"Teach a Molmo2Fish: Towards interactive fish tracking with natural language guidance"* ([paper](https://huggingface.co/papers/2608.18602) ยท [code](https://github.com/tidalove/molmo2fish)). Molmo2Fish is a LoRA-finetuned [Molmo2](https://huggingface.co/allenai) VLM that tracks salmon in ARIS **sonar** video and โ€” crucially โ€” accepts a plain-English critique of its own output and re-emits corrected tracks. The paper reports tracking accuracy going from ~5% to ~79% over a handful of conversational correction turns. ## How the demo works 1. **โ‘  Track all fish** sends the clip with the prompt `track all fish`. The model replies with the html-v2 pointing format used in training: `fish` (timestamps in seconds at 2 FPS, ids, and x/y normalised to 0โ€“1000). 2. **โ‘ก Apply correction** rebuilds the conversation โ€” video on the first user turn, the model's previous `` answer as the assistant turn, your critique as the new user turn โ€” exactly as in `olmo/eval/vllm_runner.py::build_multi_turn_chat`, and the model regenerates the track set. Points are parsed with the same regexes as `olmo/preprocessing/point_formatter.py` and drawn back onto the 6 FPS source video. ## Example clips The three sonar clips shipped with this Space are re-encoded (G channel, 6 FPS, libx264, matching the repo's `encode_frames_to_video` recipe) from the Caltech Fish Counting release [**perona-lab/cfc26**](https://huggingface.co/datasets/perona-lab/cfc26), which is distributed under **CC-BY-4.0** โ€” credit to the Caltech Fish Counting / CFC26 authors. The correction prompts pre-filled with each example are verbatim from the validation split of [tidalove/cfc-track-instruction](https://huggingface.co/datasets/tidalove/cfc-track-instruction). ## Notes - Runs on ZeroGPU; the model is loaded in bfloat16 (~16 GB VRAM). - Video is sampled at 2 FPS, max 128 frames, per the model's `video_preprocessor_config.json`. - The released checkpoint ships a config mismatch: `processor_config.json` sets `use_frame_special_tokens: true` (so each frame is wrapped in ``/``, matching training) while `config.json` sets it `false`, which makes the model count `` instead and abort with `AssertionError: Expected 0 videos, but got 1`. `app.py` aligns the two at load time. - A truncated answer (no closing ``) means you hit the *Max new tokens* cap โ€” raise it in **Advanced**.