--- title: BioLoom — Zero-Shot Biomedical Image Classification emoji: 🔬 colorFrom: red colorTo: pink sdk: gradio sdk_version: 6.32.0 app_file: app.py short_description: BioLoom CLIP zero-shot biomedical image classification python_version: "3.12" startup_duration_timeout: 30m --- # 🔬 BioLoom — zero-shot biomedical image classification This Space runs [BioLoom (DFN-2B)](https://huggingface.co/ChartFoundation/BioLoom-models) — a ~454M-parameter biomedical CLIP-style dual encoder (ViT-L/14 vision tower + BioClinical ModernBERT text tower) trained on 52.4M figure–caption pairs from scientific articles — as an interactive zero-shot classifier. **How to use:** upload a biomedical image, pick a benchmark preset (or type your own candidate classes, one per line), and hit **Classify**. Each class is described by two prompt views; the two normalized view embeddings are averaged and re-normalized into a class prototype, and the normalized image embedding is scored against every prototype by cosine similarity — the exact protocol from the [BioLoom evaluation suite](https://huggingface.co/datasets/ChartFoundation/BioLoom-EvalSuite). Preset prompts are verbatim from the suite; example images are benchmark test inputs paired with their task's class list. Links: [paper](https://arxiv.org/abs/2611.33151) · [code](https://github.com/yuweiyang-anu/BioLoom) · [project page](https://bioloom-clip.github.io/) ## Model loading The checkpoint is fetched at runtime from `ChartFoundation/BioLoom-models` (`Main/DFN-2B/open_clip_pytorch_model.bin`, ~1.8 GB) and loaded through the authors' [open_clip fork](https://github.com/yuweiyang-anu/BioLoom) (vendored in this Space under `open_clip/`, MIT licence) — the same route as the official [`evaluation/common.py`](https://github.com/yuweiyang-anu/BioLoom/blob/main/evaluation/common.py). ## Example image credits The bundled example images come from the BioLoom evaluation suite and are redistributed under their upstream licences: - **HyperKvasir** — CC BY 4.0, [Borgli et al. 2020](https://doi.org/10.1038/s41597-020-00622-y) - **GastroVision** — CC BY 4.0, [Jirawale et al. 2023](https://arxiv.org/abs/2307.08140) - **DERM12345** — CC BY, [Rochameduda et al. 2024](https://doi.org/10.1038/s41597-024-04104-3); images are ISIC Archive derivative works — attribution to the [ISIC Archive](https://isic-archive.com/) is retained as required. Class prompts and benchmark definitions are from [ChartFoundation/BioLoom-EvalSuite](https://huggingface.co/datasets/ChartFoundation/BioLoom-EvalSuite).