Official PyTorch implementation of USTri
A tri-stage ultrasound intelligence pipeline for multi-organ, multi-task, and workflow-level ultrasound analysis.
- Tri-stage design: from a universal generalist (USGen) to lightweight specialists (USpec) and finally an agentic system (USAgent).
- Unified task support: segmentation, classification, detection, and regression in one framework.
- Workflow-level inference: compose trained specialists into interpretable, clinician-style pipelines.
- Strong performance on the FMC UIA validation benchmark across 27 datasets and 4 task types.
USTri is designed for real-world ultrasound intelligence, where data vary widely across organs, views, devices, and acquisition protocols.
It contains three stages:
- Stage I — USGen: a universal ultrasound generalist trained with dataset rotation to learn broad and transferable priors.
- Stage II — USpec: lightweight dataset-specific specialization with frozen backbone + compact heads.
- Stage III — USAgent: an agentic inference layer that routes tasks, calls specialists as tools, and renders structured reports.
On the FMC UIA unseen-domain validation set, USpec achieves the best overall performance reported in the paper:
| Task | Metric | USpec |
|---|---|---|
| Segmentation | DSC ↑ | 0.8980 |
| Segmentation | HD ↓ | 27.21 |
| Classification | AUC ↑ | 0.9352 |
| Classification | F1 ↑ | 0.8593 |
| Classification | MCC ↑ | 0.7675 |
| Detection | IoU ↑ | 0.8000 |
| Regression | MRE ↓ | 18.42 |
git clone https://github.com/MacDunno/USTri.git
cd USTriCreate your environment and install the packages used in the codebase:
pip install torch torchvision torchaudio
pip install albumentations opencv-python pandas numpy tqdm scikit-learn SimpleITK
pip install tensorboard segmentation-models-pytorchThe training code expects the dataset under:
data/train/
Please organize the data following the official FMC UIA format, including the CSV metadata files used by the provided scripts.
python train.pypython train_phase2_single_dataset.py --task-id IUGCYou can replace IUGC with any supported task id defined in model_factory.py.
Run evaluation on saved predictions with:
python evaluate.pyUSTri supports four unified task categories:
- Segmentation
- Classification
- Detection
- Regression
Example task identifiers in the current codebase include:
IUGCFUGCfetal_femurbreast_2clsbreast_3clsfetal_plane_clsfetal_head_pos_clsfetal_sacral_pos_cls
If you find this repository useful, please cite:
@inproceedings{ustri,
title = {Unified Ultrasound Intelligence Toward an End-to-End Agentic System},
author = {Ma, Chen and Li, Yunshu and Fu, Junhu and Liang, Shuyu and Wang, Yuanyuan and Guo, Yi},
booktitle = {IEEE International Symposium on Biomedical Imaging (ISBI)},
year = {2026}
}
@article{tinyusfm,
author={Ma, Chen and Jiao, Jing and Liang, Shuyu and Fu, Junhu and Wang, Qin and Li, Zeju and Wang, Yuanyuan and Guo, Yi},
journal={IEEE Journal of Biomedical and Health Informatics},
title={TinyUSFM: Towards Compact and Efficient Ultrasound Foundation Models},
year={2026},
pages={1-14},
doi={10.1109/JBHI.2026.3678309}
}
@incollection{iugc,
title={Unlabeled Data-Driven Fetal Landmark Detection in Intrapartum Ultrasound},
author={Ma, Chen and Li, Yunshu and Guo, Bowen and Jiao, Jing and Huang, Yi and Wang, Yuanyuan and Guo, Yi},
booktitle={Intrapartum Ultrasound Grand Challenge},
pages={14--23},
year={2025},
publisher={Springer}
}