Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
pipeline_tag: image-classification
|
| 5 |
+
tags:
|
| 6 |
+
- medical-imaging
|
| 7 |
+
- breast-ultrasound
|
| 8 |
+
- bi-rads
|
| 9 |
+
- retrieval-augmented-generation
|
| 10 |
+
- vision-language
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# B-RAD inference checkpoints
|
| 14 |
+
|
| 15 |
+
Released inference weights for **B-RAD**, an interpretable multimodal
|
| 16 |
+
retrieval-augmented diagnosis pipeline for breast ultrasound. B-RAD turns a
|
| 17 |
+
single breast ultrasound image into an interpretable BI-RADS assessment by
|
| 18 |
+
chaining four modules: BI-RADS-aware retrieval, retrieval-guided few-shot
|
| 19 |
+
detection, foundational segmentation, and region-aware classification.
|
| 20 |
+
|
| 21 |
+
- **Paper**: [npj Digital Medicine (2026)](https://www.nature.com/articles/s41746-026-03272-3)
|
| 22 |
+
- **DOI**: [10.1038/s41746-026-03272-3](https://doi.org/10.1038/s41746-026-03272-3)
|
| 23 |
+
- **Code**: [github.com/snuh-rad-aicon/B-RAD](https://github.com/snuh-rad-aicon/B-RAD)
|
| 24 |
+
|
| 25 |
+
## Files
|
| 26 |
+
|
| 27 |
+
| File | Size | Module | Contents |
|
| 28 |
+
|---|---:|---|---|
|
| 29 |
+
| `b_rad_clip.pt` | 1.98 GiB | B-RAD-CLIP | VPT-adapted BiomedCLIP image tower, BioLinkBERT-large text tower, both 512-d projection heads, the BI-RADS ordinal heads, and the learned temperature |
|
| 30 |
+
| `b_rad_full.pt` | 1.98 GiB | B-RAD-FULL | the same encoder plus the 5-fold BI-RADS classification ensemble (`mlp_heads`) and its per-fold standard scalers |
|
| 31 |
+
| `b_rad_det.pt` | 339 MiB | B-RAD-Det | detector state dict: ViT-B/16 backbone, OWL-ViT-style detection head, and the four learned class queries |
|
| 32 |
+
|
| 33 |
+
SHA-256:
|
| 34 |
+
|
| 35 |
+
```text
|
| 36 |
+
bb0e2827dd2c1e14741a567cbd960d8579b0d3c07fc544c6f844c9246b61fe30 b_rad_clip.pt
|
| 37 |
+
0989a3e8b1f640a1b5c8679056cec2494b0ee07a7d48b0ab8b5e4e37baadef3e b_rad_full.pt
|
| 38 |
+
1a6a86433d7fc381c20a380a42217d1bf1ba4e9558a3becabe28b4ee9656e4de b_rad_det.pt
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
`b_rad_det.pt` is the fold-0 stage-2 detector.
|
| 42 |
+
|
| 43 |
+
## Usage
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
git clone https://github.com/snuh-rad-aicon/B-RAD && cd B-RAD
|
| 47 |
+
conda env create -f environment.yml && conda activate b-rad
|
| 48 |
+
|
| 49 |
+
bash B-RAD/ckpts/download_weights.sh # fetches this repo, plus UltraSam.pth
|
| 50 |
+
bash B-RAD/scripts/inference_full.sh # end-to-end on the bundled sample
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
`notebooks/brad_inference_demo.ipynb` runs the same pipeline with a
|
| 54 |
+
visualization of every stage. The segmentation module needs its own OpenMMLab
|
| 55 |
+
environment; see the repository README.
|
| 56 |
+
|
| 57 |
+
`UltraSam.pth` for B-RAD-Seg is not hosted here; `download_weights.sh` fetches it
|
| 58 |
+
from the [UltraSam](https://github.com/CAMMA-public/UltraSam) authors.
|
| 59 |
+
|
| 60 |
+
## Where each file is used
|
| 61 |
+
|
| 62 |
+
```text
|
| 63 |
+
B-RAD/
|
| 64 |
+
βββ B-RAD-CLIP/ infer_retrieval.py --ckpt b_rad_clip.pt
|
| 65 |
+
βββ B-RAD-Det/ inference_single.py --ckpt b_rad_det.pt
|
| 66 |
+
βββ B-RAD-Seg/ infer_bbox.py --ckpt UltraSam.pth
|
| 67 |
+
βββ B-RAD-FULL/ infer_birads.py --ckpt b_rad_full.pt
|
| 68 |
+
βββ ckpts/ download_weights.sh (puts all four here)
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## Intended use and limitations
|
| 72 |
+
|
| 73 |
+
Research use only. These weights are not a medical device and must not be used
|
| 74 |
+
for clinical decision making. They were trained on public breast-ultrasound
|
| 75 |
+
cohorts plus a single-institution clinical cohort, so performance on other
|
| 76 |
+
scanners, populations, or acquisition protocols is not characterized.
|
| 77 |
+
|
| 78 |
+
## Citation
|
| 79 |
+
|
| 80 |
+
```bibtex
|
| 81 |
+
@article{jang2026interpretable,
|
| 82 |
+
title = {Interpretable multimodal retrieval augmented diagnosis for breast ultrasound with multinational clinical validation and reader study},
|
| 83 |
+
author = {Jang, Han and An, Subin and Jung, Sunghyun and Ji, Hye and Kim, Miran and Lee, Soochahn and Choi, Kyu Sung and Ha, Su Min},
|
| 84 |
+
journal = {npj Digital Medicine},
|
| 85 |
+
year = {2026},
|
| 86 |
+
publisher = {Nature Publishing Group UK London},
|
| 87 |
+
doi = {10.1038/s41746-026-03272-3},
|
| 88 |
+
url = {https://doi.org/10.1038/s41746-026-03272-3}
|
| 89 |
+
}
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
## License
|
| 93 |
+
|
| 94 |
+
MIT, matching the [code repository](https://github.com/snuh-rad-aicon/B-RAD/blob/main/LICENSE).
|
| 95 |
+
Upstream components retain their original licenses: BiomedCLIP, BioLinkBERT,
|
| 96 |
+
OWL-ViT, and the `timm` ViT-B/16 initialization. `UltraSam`, distributed
|
| 97 |
+
separately, is CC BY-NC-SA 4.0 and non-commercial only.
|