The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: ValueError
Message: Invalid string class label BiomedCoOp@2473cb30c38d0eb931de0e44df9d346ea486c403
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
return get_rows(
^^^^^^^^^
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/utils.py", line 77, in get_rows
rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2690, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2240, in __iter__
example = _apply_feature_types_on_example(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2157, in _apply_feature_types_on_example
encoded_example = features.encode_example(example)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 2152, in encode_example
return encode_nested_example(self, example)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1437, in encode_nested_example
{k: encode_nested_example(schema[k], obj.get(k), level=level + 1) for k in schema}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1460, in encode_nested_example
return schema.encode_example(obj) if obj is not None else None
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1143, in encode_example
example_data = self.str2int(example_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1080, in str2int
output = [self._strval2int(value) for value in values]
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/features/features.py", line 1101, in _strval2int
raise ValueError(f"Invalid string class label {value}")
ValueError: Invalid string class label BiomedCoOp@2473cb30c38d0eb931de0e44df9d346ea486c403Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Biomedical Few-shot Image Classification for Vision-Language Models
Overview
Recent advancements in vision-language models (VLMs), such as CLIP, have demonstrated substantial success in self-supervised representation learning for vision tasks. However, effectively adapting VLMs to downstream applications remains challenging, as their accuracy often depends on time-intensive and expertise-demanding prompt engineering, while full model fine-tuning is costly. This is particularly true for biomedical images, which, unlike natural images, typically suffer from limited annotated datasets, unintuitive image contrasts, and nuanced visual features. Recent prompt learning techniques, such as Context Optimization (CoOp) intend to tackle these issues, but still fall short in generalizability. Meanwhile, explorations in prompt learning for biomedical image analysis are still highly limited. In this work, we propose BiomedCoOp, a novel prompt learning framework that enables efficient adaptation of BiomedCLIP for accurate and highly generalizable few-shot biomedical image classification. Our approach achieves effective prompt context learning by leveraging semantic consistency with average prompt ensembles from Large Language Models (LLMs) and knowledge distillation with a statistics-based prompt selection strategy. We conducted comprehensive validation of our proposed framework on 11 medical datasets across 9 modalities and 10 organs against existing state-of-the-art methods, demonstrating significant improvements in both accuracy and generalizability.
Datasets Description
| Modality | Organ(s) | Name | Classes | # train/val/test |
|---|---|---|---|---|
| Computerized Tomography | Kidney | CTKidney | Kidney Cyst, Kidney Stone, Kidney Tumor, Normal Kidney | 6221/2487/3738 |
| Dermatoscopy | Skin | DermaMNIST | Actinic Keratosis, Basal Cell Carcinoma, Benign Keratosis, Dermatofibroma, Melanocytic nevus, Melanoma, Vascular Lesion | 7007/1003/2005 |
| Endoscopy | Colon | Kvasir | Dyed Lifted Polyps, Normal Cecum, Esophagitis, Dyed Resection Margins, Normal Pylorus, Normal Z Line, Polyps, Ulcerative Colitis | 2000/800/1200 |
| Fundus Photography | Retina | RETINA | Cataract, Diabetic Retinopathy, Glaucoma, Normal Retina | 2108/841/1268 |
| Histopathology | Lung, Colon | LC25000 | Colon Adenocarcinoma, Colon Benign Tissue, Lung Adenocarcinoma, Lung Benign Tissue, Lung Squamous Cell Carcinoma | 12500/5000/7500 |
| Histopathology | Colorectal | CHMNIST | Adipose Tissue, Complex Stroma, Debris, Empty Background, Immune Cells, Normal Mucosal Glands, Simple Stroma, Tumor Epithelium | 2496/1000/1504 |
| Magnetic Resonance Imaging | Brain | BTMRI | Glioma Tumor, Meningioma Tumor, Normal Brain, Pituitary Tumor | 2854/1141/1717 |
| Magnetic Resonance Imaging | Brain | BTMRI-P | Glioma Tumor, Meningioma Tumor, Normal Brain, Pituitary Tumor | 8000/0/1000 |
| Magnetic Resonance Imaging | Brain | BTMRI-S | Glioma Tumor, Meningioma Tumor, Normal Brain, Pituitary Tumor | 2451/0/529 |
| Magnetic Resonance Imaging | Brain | BRISC | Glioma Tumor, Meningioma Tumor, Normal Brain, Pituitary Tumor | 2498/0/1000 |
| Optical Coherence Tomography | Retina | OCTMNIST | Choroidal Neovascularization, Drusen, Diabetic Macular Edema, Normal | 97477/10832/1000 |
| Ultrasound | Breast | BUSI | Benign Tumors, Malignant Tumors, Normal Scans | 389/155/236 |
| Ultrasound | Breast | BUID | Benign Tumors, Malignant Tumors | 162/0/36 |
| Ultrasound | Breast | BUSBRA | Benign Tumors, Malignant Tumors | 1311/0/283 |
| Ultrasound | Breast | UDIAT | Benign Tumors, Malignant Tumors | 113/0/26 |
| X-Ray | Chest | COVID-QU-Ex | COVID-19, Lung Opacity, Normal Lungs, Viral Pneumonia | 10582/4232/6351 |
| X-Ray | Knee | KneeXray | No, Doubtful, Minimal, Moderate, and Severe Osteoarthritis | 5778/826/1656 |
Download the datasets
All the datasets can be found here on HuggingFace. Download each dataset seperately:
- BTMRI [Drive | HuggingFace]
- BUSI [Drive | HuggingFace]
- CHMNIST [Drive | HuggingFace]
- COVID_19 [Drive | HuggingFace]
- CTKidney [Drive | HuggingFace]
- DermaMNIST [Drive | HuggingFace]
- KneeXray [Drive | HuggingFace]
- Kvasir [Drive | HuggingFace]
- LungColon [Drive | HuggingFace]
- OCTMNIST [Drive | HuggingFace]
- RETINA [Drive | HuggingFace]
Domain Generalization Datasets
- BTMRI-P HuggingFace
- BTMRI-S HuggingFace
- BRISC HuggingFace
- BUID HuggingFace
- BUSBRA HuggingFace
- UDIAT HuggingFace
After downloading each dataset, unzip and place each under its respective directory like the following
BTMRI/
|ββ BTMRI/
| |ββ glioma_tumor/
| |ββ meningioma_tumor/
| |ββ normal_brain/
| |ββ pituitary_tumor/
|ββ split_BTMRI.json
Citation
If you use our work, please consider citing:
@inproceedings{koleilat2025biomedcoop,
title={Biomedcoop: Learning to prompt for biomedical vision-language models},
author={Koleilat, Taha and Asgariandehkordi, Hojat and Rivaz, Hassan and Xiao, Yiming},
booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
pages={14766--14776},
year={2025}
}
@article{
koleilat2026clipsvd,
title={{CLIP}-{SVD}: Efficient and Interpretable Vision{\textendash}Language Adaptation via Singular Values},
author={Taha Koleilat and Hassan Rivaz and Yiming Xiao},
journal={Transactions on Machine Learning Research},
issn={2835-8856},
year={2026},
url={https://openreview.net/forum?id=XYy8pwqwMR}
}
@inproceedings{koleilat2026evisteer,
title={Evi-Steer: Learning to Steer Biomedical Vision-Language Models through Efficient and Generalizable Evidential Tuning}
author={Koleilat, Taha and Rivaz, Hassan and Xiao, Yiming},
booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention}
year={2026}
}
- Downloads last month
- 244