Med-Query: Steerable Parsing of 9-DoF Medical Anatomies with Query Embedding

Heng Guo, Jianfeng Zhang, Ke Yan, Le Lu, Minfeng Xu

TL;DR

Med-Query is a novel, steerable framework for 3D medical image parsing that allows researchers and clinicians to retrieve specific anatomical structures (like the "5th right rib") using query embeddings. By combining a one-stage Transformer-based detector for 9-degree-of-freedom (9-DoF) pose estimation with a high-resolution segmentation head, the system achieves state-of-the-art accuracy while being significantly faster than traditional exhaustive methods.

What Problem Does This Paper Address?

Parsing human anatomy from 3D CT scans—identifying and segmenting every rib, vertebra, or organ—is a foundational task in medical AI. However, it faces three major hurdles:

  1. Complexity and Scale: Anatomies like ribs are elongated, oblique, and packed closely together. Standard axis-aligned bounding boxes often overlap significantly, leading to "spatial collisions" that confuse segmentation models.
  2. Efficiency: Most current algorithms process the entire 3D volume uniformly. If a clinician only needs to see the first lumbar vertebra for an osteoporosis screen, processing the whole chest and abdomen is a waste of computational resources.
  3. Robustness: Pathologies, fractures, or limited fields-of-view (FOV) can break the heuristic rules (like "counting from the top") that many traditional parsing algorithms rely on.

Methods

The authors propose Med-Query, a "detection-then-segmentation" framework designed for steerability and efficiency. The pipeline consists of three main stages:

  1. ROI Extractor: A lightweight U-Net coarsely identifies the general region of interest (e.g., the ribcage) at a low resolution to focus the model's attention.
  2. Steerable 9-DoF Detector: This is the heart of the paper. Built on the DETR (Detection Transformer) architecture, it estimates 9-DoF bounding boxes (3 for position, 3 for scale, and 3 for rotation).
  3. The "Steerable" Secret: In standard DETR, query embeddings are matched to objects randomly during training. Med-Query introduces a weighted adjacency matrix in the bipartite matching process. This forces a deterministic, one-to-one mapping between a specific query embedding and a specific anatomical label (e.g., Query #5 always looks for the 5th right rib).
  4. Segmentation Head: Once a 9-DoF box is detected, the system crops that specific sub-volume at high resolution and uses a stand-alone U-Net to produce a precise binary mask.
The Med-Query architecture showing the ROI extractor, steerable detector, and segmentation head.

Datasets

The authors evaluated Med-Query across three distinct tasks:

  • RibInst (New): A newly curated dataset of 654 CT scans with instance-level rib annotations. It’s designed to provide a standardized benchmark for rib segmentation without requiring centerline extraction.
  • CTSpine1K: A large-scale public dataset for spinal vertebrae segmentation.
  • FLARE22: A dataset from a MICCAI challenge focused on multi-organ abdominal segmentation.

Key Insights and Ideas

  • Medical Uniqueness as a Prior: Unlike natural images where "dog" can appear anywhere and in any quantity, medical anatomy is highly structured. There is only one "5th right rib." Med-Query leverages this uniqueness to stabilize the Transformer's query matching.
  • 9-DoF > Axis-Aligned: By allowing bounding boxes to rotate (9-DoF), the model can tightly encompass oblique structures like ribs. This drastically reduces the amount of "background" or "neighboring anatomy" voxels included in the box, simplifying the subsequent segmentation task.
  • Steerability = Speed: Because the queries are deterministic, the model can be "steered" to only execute the segmentation head for specific requested organs. If you only query 4 ribs instead of 24, you can save significant inference time.
Illustration of the steerable concept where specific queries retrieve specific anatomies.

Key Results

  • Accuracy: On the RibInst dataset, Med-Query achieved a 97.0% identification rate and a 90.9% Dice score, outperforming strong baselines like CenterNet, FCOS, and the popular nnU-Net.
  • Efficiency: The entire pipeline takes roughly 3 seconds per CT scan on an NVIDIA V100 GPU. This is nearly 100x faster than the 3D full-resolution version of nnU-Net (252 seconds) while maintaining higher accuracy.
  • Robustness: The model proved resilient to "broken" structures and limited FOVs where traditional heuristic-based methods often fail.
Qualitative comparison showing Med-Query's robustness against broken structures compared to other methods.

Limitations and Future Work

While powerful, Med-Query currently requires multi-stage training, meaning the ROI extractor, detector, and segmentation head are trained separately. Making the framework end-to-end trainable could further optimize performance.

Additionally, the "steerability" currently relies on a fixed order of learned embeddings. The authors suggest that future iterations could integrate natural language embeddings (like those from CLIP) to allow clinicians to type free-form queries like "show me the fractured ribs" directly into the system.

Summary updated

BibTeX
@article{guo2024med,
  author = {Heng Guo and Jianfeng Zhang and Ke Yan and Le Lu and Minfeng Xu},
  title = {{Med-Query: Steerable Parsing of 9-DoF Medical Anatomies with Query Embedding}},
  journal = {IEEE Journal of Biomedical and Health Informatics},
  year = {2024},
  doi = {10.1109/jbhi.2024.3461951},
}
Figure