File size: 8,962 Bytes
90ad17e
 
 
 
15ff68e
797fea7
95640b2
 
 
797fea7
dbf3138
95640b2
 
 
797fea7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95640b2
 
 
 
 
 
 
90ad17e
 
 
 
 
95640b2
 
 
 
18dd467
 
 
 
 
 
 
 
95640b2
8b8cb9a
 
95640b2
8b8cb9a
95640b2
8b8cb9a
 
 
95640b2
59c2e75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95640b2
90ad17e
95640b2
 
90ad17e
95640b2
 
90ad17e
 
797fea7
90ad17e
797fea7
 
90ad17e
 
 
 
 
 
 
 
95640b2
 
90ad17e
 
 
 
 
 
95640b2
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
---
pipeline_tag: image-segmentation
---

This is a segmentation model trained for pancretic lesion segmentation, presented in the paper [Scaling Artificial Intelligence for Multi-Tumor Early Detection with More Reports, Fewer Masks](https://huggingface.co/papers/2510.14803). It was trained with the Report Supervision ([R-Super](https://github.com/MrGiovanni/R-Super), MICCAI 2025, best paper award runner-up) training methodology, which **learns tumor segmentation directly from radiology reports** (through new loss functions).
This checkpoint was trained with public data: **1.8K pancreatic lesion reports** from the [Merlin](https://stanfordaimi.azurewebsites.net/datasets?domain=BODY) dataset, plus **0.9K pancreatic lesion masks** from [PanTS](https://github.com/MrGiovanni/PanTS).

The AI model architecture is MedFormer, its training methology is Report Supervision (R-Super).

**Training and inference code: https://github.com/MrGiovanni/R-Super**

<details>
  <summary>Label order</summary>
  
```yaml
- adrenal_gland_left
- adrenal_gland_right
- aorta
- bladder
- colon
- common_bile_duct
- duodenum
- femur_left
- femur_right
- gall_bladder
- kidney_left
- kidney_right
- liver
- lung_left
- lung_right
- pancreas
- pancreas_body
- pancreas_head
- pancreas_tail
- pancreatic_lesion
- postcava
- prostate
- spleen
- stomach
- superior_mesenteric_artery
- veins
```
</details>


---
# Papers

<b>Scaling Artificial Intelligence for Multi-Tumor Early Detection with More Reports, Fewer Masks</b> <br/>
[Pedro R. A. S. Bassi](https://scholar.google.com/citations?user=NftgL6gAAAAJ&hl=en), [Wenxuan Li](https://scholar.google.com/citations?hl=en&user=tpNZM2YAAAAJ), [Jieneng Chen](https://scholar.google.com/citations?user=yLYj88sAAAAJ&hl=zh-CN), Zheren Zhu, Tianyu Lin, [Sergio Decherchi](https://scholar.google.com/citations?user=T09qQ1IAAAAJ&hl=it), [Andrea Cavalli](https://scholar.google.com/citations?user=4xTOvaMAAAAJ&hl=en), [Kang Wang](https://radiology.ucsf.edu/people/kang-wang), [Yang Yang](https://scholar.google.com/citations?hl=en&user=6XsJUBIAAAAJ), [Alan Yuille](https://www.cs.jhu.edu/~ayuille/), [Zongwei Zhou](https://www.zongweiz.com/)* <br/>
*Johns Hopkins University* <br/>
<a href='https://huggingface.co/papers/2510.14803'><img src='https://img.shields.io/badge/Paper-PDF-purple'></a>

<b>Learning Segmentation from Radiology Reports</b> <br/>
[Pedro R. A. S. Bassi](https://scholar.google.com/citations?user=NftgL6gAAAAJ&hl=en), [Wenxuan Li](https://scholar.google.com/citations?hl=en&user=tpNZM2YAAAAJ), [Jieneng Chen](https://scholar.google.com/citations?user=yLYj88sAAAAJ&hl=zh-CN), Zheren Zhu, Tianyu Lin, [Sergio Decherchi](https://scholar.google.com/citations?user=T09qQ1IAAAAJ&hl=it), [Andrea Cavalli](https://scholar.google.com/citations?user=4xTOvaMAAAAJ&hl=en), [Kang Wang](https://radiology.ucsf.edu/people/kang-wang), [Yang Yang](https://scholar.google.com/citations?hl=en&user=6XsJUBIAAAAJ), [Alan Yuille](https://www.cs.jhu.edu/~ayuille/), [Zongwei Zhou](https://www.zongweiz.com/)* <br/>
*Johns Hopkins University* <br/>
MICCAI 2025 <br/>
<b>Best Paper Award Runner-up (top 2 in 1,027 papers)</b>  <br/>
<a href='https://link.springer.com/chapter/10.1007/978-3-032-04971-1_29'><img src='https://img.shields.io/badge/Paper-PDF-purple'></a><a href='https://link.springer.com/chapter/10.1007/978-3-032-04971-1_29'><img src='https://img.shields.io/badge/Springer-Link-orange'></a>

<p align="center">
  <img src="https://github.com/MrGiovanni/R-Super/raw/main/documents/miccai_2025_best_paper_award.png"
       alt="Prize"
       width="400">
</p>

<b>PanTS: The Pancreatic Tumor Segmentation Dataset</b> <br/>
[Wenxuan Li](https://scholar.google.com/citations?hl=en&user=tpNZM2YAAAAJ), [Xinze Zhou](), [Qi Chen](), Tianyu Lin, Pedro R.A.S. Bassi, ..., [Alan Yuille](https://www.cs.jhu.edu/~ayuille/), [Zongwei Zhou](https://www.zongweiz.com/)<sup></sup> <br/>
*Johns Hopkins University* <br/>
<a href='https://www.zongweiz.com/dataset'><img src='https://img.shields.io/badge/Project-Page-Green'></a> <a href='https://www.cs.jhu.edu/~zongwei/publication/li2025pants.pdf'><img src='https://img.shields.io/badge/Paper-PDF-purple'></a>

<b>Merlin: A vision language foundation model for 3d computed tomography</b> <br/>
Louis Blankemeier, Joseph P. Cohen, Ashwin Kumar, ..., Akshay S. Chaudhari<br/>
*Stanford* <br/>




# Inference

**0- Download and installation.**


<details>
<summary style="margin-left: 25px;">[Optional] Install Anaconda on Linux</summary>
<div style="margin-left: 25px;">
    
```bash
wget https://repo.anaconda.com/archive/Anaconda3-2024.06-1-Linux-x86_64.sh
bash Anaconda3-2024.06-1-Linux-x86_64.sh -b -p ./anaconda3
./anaconda3/bin/conda init
source ~/.bashrc
```
</div>
</details>

```
git clone https://github.com/MrGiovanni/R-Super
cd R-Super/rsuper_train
conda create -n rsuper python=3.10
conda activate rsuper
pip install -r requirements.txt
pip install -U "huggingface_hub[cli]"
hf download AbdomenAtlas/R-SuperPanTSMerlin --local-dir ./R-SuperPanTSMerlin
```

**1- Pre-processing.** Prepare your dataset in the format below. You can use symlinks instead of copying your data.
<details>
<summary style="margin-left: 25px;">Dataset format.</summary>
<div style="margin-left: 25px;">

```
/path/to/dataset/
├── BDMAP_0000001
|    └── ct.nii.gz
├── BDMAP_0000002
|    └── ct.nii.gz
...
```
</div>
</details>

**2- Inference.** The code below will inference, generating binary segmentation masks. To save probabilities, add the argument --save_probabilities or --save_probabilities_lesions (which saves only probabilities for lesions, not for organs). The optional argument --organ_mask_on_lesion will use organ segmentations (produced by the R-Super model itself, not ground-truth) to remove tumor predictions outside its organ. 

```bash
python predict_abdomenatlas.py --load R-SuperPanTSMerlin/merlin_pancreas_pants_release/fold_0_latest.pth --img_path /path/to/test/dataset/ --class_list R-SuperPanTSMerlin/labels_pants.yaml --save_path /path/to/inference/output/ --organ_mask_on_lesion
```
<details>
<summary style="margin-left: 25px;"> Argument Details </summary>
<div style="margin-left: 25px;">
  
- load: path to the model checkpoint (fold_0_latest.pth)
- img_path: path to dataset
- class_list: a yaml file with the class names of your model
- save_path: path to output, where masks will be saved
- ids: this is an optional argument. By default, the code will predict on all cases in --img_path. If you pass ids, the code will only test with the CT scans indicated in ids. You can use this to separate a test set: --ids /path/to/test/set/ids.csv. The csv file must have a 'BDMAP ID' column with the ids of the test cases.

</details>

For more details, see https://github.com/MrGiovanni/R-Super/tree/main/rsuper_train#test




# Citations
If you use the code, data or methods in this repository, please cite:

```
@inproceedings{bassi2025learning,
  title={Learning Segmentation from Radiology Reports},
  author={Bassi, Pedro RAS and Li, Wenxuan and Chen, Jieneng and Zhu, Zheren and Lin, Tianyu and Decherchi, Sergio and Cavalli, Andrea and Wang, Kang and Yang, Yang and Yuille, Alan L and others},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={305--315},
  year={2025},
  organization={Springer}
}

@misc{bassi2025scaling,
      title={Scaling Artificial Intelligence for Multi-Tumor Early Detection with More Reports, Fewer Masks}, 
      author={Pedro R. A. S. Bassi and Xinze Zhou and Wenxuan Li and Szymon Płotka and Jieneng Chen and Qi Chen and Zheren Zhu and Jakub Prządo and Ibrahim E. Hamacı and Sezgin Er and Yuhan Wang and Ashwin Kumar and Bjoern Menze and Jarosław B. Ćwikła and Yuyin Zhou and Akshay S. Chaudhari and Curtis P. Langlotz and Sergio Decherchi and Andrea Cavalli and Kang Wang and Yang Yang and Alan L. Yuille and Zongwei Zhou},
      year={2025},
      eprint={2510.14803},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2510.14803}, 
}

@article{bassi2025radgpt,
  title={Radgpt: Constructing 3d image-text tumor datasets},
  author={Bassi, Pedro RAS and Yavuz, Mehmet Can and Wang, Kang and Chen, Xiaoxi and Li, Wenxuan and Decherchi, Sergio and Cavalli, Andrea and Yang, Yang and Yuille, Alan and Zhou, Zongwei},
  journal={arXiv preprint arXiv:2501.04678},
  year={2025}
}
```

## Acknowledgement

This work was supported by the Lustgarten Foundation for Pancreatic Cancer Research, the Patrick J. McGovern Foundation Award, and the National Institutes of Health (NIH) under Award Number R01EB037669. We would like to thank the Johns Hopkins Research IT team in [IT@JH](https://researchit.jhu.edu/) for their support and infrastructure resources where some of these analyses were conducted; especially [DISCOVERY HPC](https://researchit.jhu.edu/research-hpc/). Paper content is covered by patents pending.