Instructions to use 1aurent/vit_tiny_patch16_224.tinyusfm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use 1aurent/vit_tiny_patch16_224.tinyusfm with timm:
import timm model = timm.create_model("hf-hub:1aurent/vit_tiny_patch16_224.tinyusfm", pretrained=True) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from 1aurent/vit_tiny_patch16_224.tinyusfm: direct link, hf CLI and curl.
- Browser
- Download file 3.02 kB
-
https://huggingface.co/1aurent/vit_tiny_patch16_224.tinyusfm/resolve/main/README.md
- Command line
-
hf download hf://1aurent/vit_tiny_patch16_224.tinyusfm/README.md
-
curl -L -o README.md https://huggingface.co/1aurent/vit_tiny_patch16_224.tinyusfm/resolve/main/README.md
3.02 kB
metadata
tags:
- feature-extraction
- timm
- ultrasound
- medical-imaging
library_name: timm
license: apache-2.0
pipeline_tag: feature-extraction
Model card for vit_tiny_patch16_224.tinyusfm
TinyUSFM is a compact Vision Transformer (ViT) ultrasound foundation model, distilled from the large-scale USFM.
It keeps foundation-level representation ability with only 5.5M parameters and 2.16 GFLOPs, and was the official lightweight continuation of USFM.
This is a timm port of the official pretrained TinyUSFM encoder checkpoint released by the authors (Google Drive, see original repo).
Model Details
- Model Type: Feature backbone (encoder-only Vision Transformer, no classifier head)
- Developed by: Chen Ma, Jing Jiao, Shuyu Liang, Junhu Fu, Qin Wang, Zeju Li, Yuanyuan Wang, Yi Guo (Fudan University)
- Model Stats:
- Params: 5.52M
- Image size: 224 x 224 x 3
- Patch size: 16 x 16 x 3
- Embed dim: 192, depth: 12, heads: 12 (head dim 16), MLP ratio: 4, qkv bias: yes, LayerNorm eps 1e-6
- Pre-training:
- Distilled from USFM (teacher) on ~200K curated ultrasound images (feature-gradient driven coreset selection) with domain-separated masked image modeling + consistency-driven dynamic distillation
- Evaluated on UniUS-Bench (8 classification + 10 segmentation datasets, 15 organs)
- Papers:
- TinyUSFM: Towards Compact and Efficient Ultrasound Foundation Models (IEEE JBHI 2026, DOI: 10.1109/JBHI.2026.3678309)
- Original: https://github.com/MacDunno/TinyUSFM
- License: Apache-2.0 (declared in the upstream README badge and License section; note: the LICENSE file itself is missing from the upstream repository)
Model Usage
Image Embeddings
from urllib.request import urlopen
from PIL import Image
import timm
# get example image
img = Image.open(
urlopen(
"https://github.com/MacDunno/TinyUSFM/raw/main/img/overview.png"
)
).convert("RGB")
# load model from the hub
model = timm.create_model(
model_name="hf-hub:1aurent/vit_tiny_patch16_224.tinyusfm",
pretrained=True,
).eval()
# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)
data = transforms(img).unsqueeze(0) # input is a (batch_size, num_channels, img_size, img_size) shaped tensor
output = model(data) # output is a (batch_size, num_features) shaped tensor
Citation
@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}
}
