--- tags: - feature-extraction - timm - ultrasound - self-supervised-learning - masked-autoencoding library_name: timm license: mit pipeline_tag: feature-extraction --- # Model card for vit_base_patch16_224.usfmae The ViT-Base encoder of **USF-MAE** (Ultrasound Self-Supervised Foundation Model with Masked Autoencoding), ported to timm as an encoder-only feature extractor (num_classes=0). USF-MAE is a masked autoencoder (MAE) pretrained self-supervised on ~370,000 ultrasound images from 46 open-source datasets (OpenUS-46); only the encoder is kept here, the MAE decoder was used during pretraining only. ![](https://github.com/Yusufii9/USF-MAE/raw/main/figures/USF-MAE.jpeg) ## Model Details - **Model Type:** Feature backbone (encoder of a masked autoencoder) - **Developed by**: Youssef Megahed, Robin Ducharme, Aylin Erman, Mark Walker, Steven Hawken, Adrian D.C. Chan - **Model Stats:** - Params: 85.8M (ViT-Base encoder) - Image size: 224 x 224 x 3 - Patch size: 16 x 16 x 3 - **Pre-training:** - Dataset: [OpenUS-46](https://github.com/Yusufii9/USF-MAE) (~370K unlabeled 2D/3D ultrasound images from 46 datasets) - Framework: [MAE](https://github.com/facebookresearch/mae) self-supervised masked patch reconstruction (25% masking ratio), initialized from ImageNet-21k MAE weights, 100 epochs (recommended checkpoint) - **Papers:** - [USF-MAE: Ultrasound Self-Supervised Foundation Model with Masked Autoencoding](https://arxiv.org/abs/2510.22990) (Biomedical Signal Processing and Control, 2026, doi:10.1016/j.bspc.2026.110313) - **Original:** https://github.com/Yusufii9/USF-MAE - **License:** [MIT](https://github.com/Yusufii9/USF-MAE/blob/main/LICENSE) - **Preprocessing (as in the original eval code):** resize to 224x224 with NEAREST interpolation (squash), scale to [0,1], normalize with ImageNet mean/std (0.485/0.456/0.406, 0.229/0.224/0.225) ## Model Usage ### Image Embeddings ```python from urllib.request import urlopen from PIL import Image import timm # get example image (any RGB ultrasound image works) img = Image.open( urlopen( "https://github.com/Yusufii9/USF-MAE/raw/main/figures/USF-MAE.jpeg" ) ).convert("RGB") # load model from the hub model = timm.create_model( model_name="hf-hub:1aurent/vit_base_patch16_224.usfmae", 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=768) shaped tensor (cls-token embedding) ``` ## Citation ```bibtex @article{MEGAHED2026110313, author = {Youssef Megahed and Robin Ducharme and Aylin Erman and Mark C. Walker and Steven Hawken and Adrian D.C. Chan}, title = {USF-MAE: Ultrasound self-supervised foundation model with masked autoencoding}, journal = {Biomedical Signal Processing and Control}, volume = {122}, pages = {110313}, year = {2026}, issn = {1746-8094}, doi = {https://doi.org/10.1016/j.bspc.2026.110313}, url = {https://www.sciencedirect.com/science/article/pii/S1746809426008670} } @misc{megahed2025usfmae, author = {Youssef Megahed and Robin Ducharme and Aylin Erman and Mark Walker and Steven Hawken and Adrian D. C. Chan}, title = {{USF-MAE}: Ultrasound Self-Supervised Foundation Model with Masked Autoencoding}, year = {2025}, eprint = {2510.22990}, archivePrefix = {arXiv}, doi = {10.48550/arXiv.2510.22990} } ```