SigLIP — breast ultrasound classification (BUSI)
Three-class classifier (benign / malignant / normal) for breast ultrasound images from the BUSI dataset, built with SigLIP. Trained with one fixed recipe that we apply unchanged to every dataset, without dataset-specific tuning.
87.18 % accuracy, macro F1 87.07 % on a 78-image hold-out.
| Metric on the held-out test set (78 images: 44 benign, 21 malignant, 13 normal) | Value |
|---|---|
| Accuracy | 87.18 % |
| Macro F1 | 87.07 % |
| Balanced accuracy | 86.47 % |
Full write-up: GitHub · companion model: YOLO.
Read BUSI numbers with care
Published accuracies on the same 780 images range from 68.8 % to 99.86 % because of different splits and protocols, and the original release contains duplicated images and some non-breast scans (Musah et al. 2025). This model was trained on the release as is, split per image, so duplicates may sit on both sides of the split.
Results
10 errors out of 78, 8 of them between benign and malignant.
Training and evaluation
| Training data | 624 images, minority classes oversampled |
| Training | 15 epochs, learning rate 5e-5, batch 16 |
| Split | stratified 80 / 10 / 10 per image, seed 42 |
| Model selection | best epoch on the validation split |
| Hardware | one NVIDIA T4 |
Usage
from PIL import Image
import torch
from torchvision.transforms import Compose, Normalize, Resize, ToTensor
from transformers import AutoModelForImageClassification
model = AutoModelForImageClassification.from_pretrained("ghostsas001/busi-breast-ultrasound-siglip").eval()
tf = Compose([Resize((224, 224)), ToTensor(), Normalize([0.5] * 3, [0.5] * 3)])
x = tf(Image.open("ultrasound.png").convert("RGB")).unsqueeze(0)
probs = torch.softmax(model(pixel_values=x).logits, 1)[0]
print(model.config.id2label[int(probs.argmax())])
Labels: benign, malignant, normal.
Limitations
Research model, not a medical device. Small dataset from one source, duplicates not removed, 78-image test set; results are not a reliable estimate on new patients or devices.
References
- Al-Dhabyani W. et al. Dataset of breast ultrasound images. Data in Brief, 2020. doi:10.1016/j.dib.2019.104863
- Musah T. et al. Towards Trustworthy Breast Tumor Segmentation in Ultrasound… 2025. arXiv:2508.17768
- SigLIP (Google) — huggingface.co/google