Skip to content
Other

SonoIntent-Models

ultrasound segmentation driven by clinical questions

2 min readupdated

A collection of two fine-tuned models (VRS-HQ and Sa2VA-14B) by QingboKang built for reasoning segmentation on ultrasound images. You feed in an ultrasound scan and a clinical question, and the model outputs a text rationale alongside a binary mask of the target anatomical structure at full original resolution. Under the hood are VRS-HQ (14.58 GB, bf16) and Sa2VA-14B (30.74 GB, fp16) weights trained on the SonoIntent clinical benchmark. Unlike standard segmentation models that rely strictly on class labels, these checkpoints analyze the medical query first and locate the target region by context. This release is built for medical AI researchers looking to reproduce the paper's results or experiment with ultrasound analysis.

Key features

  • Two standalone checkpoints: the repo ships ready-to-use VRS-HQ and Sa2VA-14B weights identical to those evaluated in the paper.
  • Reasoning before masking: both models generate up to 384 tokens of text explanation while simultaneously predicting the binary mask of the target structure.
  • Built-in visualization and metrics: included scripts automatically save 4-panel comparison grids and calculate Dice, IoU, precision, and recall.
  • Flexible deployment: supports both GPU and CPU inference, letting you assign the vision and LLM components of Sa2VA-14B to separate devices.

What you can do

  • Test structure segmentation (such as the fetal head or pubic symphysis) on 6 ready-to-run clinical cases inside examples/cases.
  • Reproduce the SonoIntent benchmark using the public split of the SonoIntent-Annotations dataset (16,869 tasks across 7 open ultrasound sources).
  • Plug the pipeline into a research prototype for automated ultrasound annotation and analysis driven by a clinician's text prompts.

Example

# Запуск VRS-HQ на одном тестовом примере
python VRS-HQ/test.py --limit 1

# Запуск Sa2VA-14B на одном тестовом примере
python Sa2VA-14B/test.py --limit 1
Read moreDetails
Full SonoIntent test split metrics (22,870 tasks): VRS-HQ hits 50.82% Overall Dice, 40.18% TargetAcc, and 33.50% TA-Dice; Sa2VA-14B reaches 48.40% Overall Dice, 98.59% TargetAcc, and 47.51% TA-Dice.
Requirements: Python 3.10+, PyTorch 2.1+. VRS-HQ needs around 15 GB of RAM or a 24 GB VRAM GPU; Sa2VA-14B requires around 31 GB of RAM or a 40 GB GPU (or dual 24 GB cards).
On first launch, VRS-HQ pulls openai/clip-vit-large-patch14 from Hugging Face.
Limitations: for research use only; not a medical device. Weight licenses: Apache-2.0 (including Llama-2 components for VRS-HQ).
Discuss Telegram 0

Will it run?

Runs in FP8 / INT8

Full precision does not fit, a quantised version does: quality barely changes down to 8 bits, more noticeably at 4 bits.

  • BF16weights 29 GB · ready files32 GB
  • FP8 / INT8recommendedweights 14 GB16 GB
  • 4-bitweights 8.1 GB9.4 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: FP8 / INT8 — from RTX 4090 · BF16 — from RTX 5090

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # QingboKang/SonoIntent-Models
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download QingboKang/SonoIntent-Models --local-dir ~/models/SonoIntent-Models
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to SonoIntent-Models
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of SonoIntent-Models (quants, finetunes, LoRAs) will show up under the bell.

No known relatives of this model yet. All derivatives on Hugging Face

About the model

QingboKang/SonoIntent-Models
Author
QingboKang
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

00

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments

Other

onegin-1

onegin-1