https://github.com/hilab-git/fpl-plus
FPL+: Filtered Pseudo Label-based Unsupervised Cross-Modality Adaptation for 3D Medical Image Segmentation
https://github.com/hilab-git/fpl-plus
Last synced: 9 months ago
JSON representation
FPL+: Filtered Pseudo Label-based Unsupervised Cross-Modality Adaptation for 3D Medical Image Segmentation
- Host: GitHub
- URL: https://github.com/hilab-git/fpl-plus
- Owner: HiLab-git
- Created: 2023-05-19T14:20:53.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-03T13:13:22.000Z (almost 2 years ago)
- Last Synced: 2025-03-20T21:38:55.038Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 21.4 MB
- Stars: 26
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FPL+: Filtered Pseudo Label-based Unsupervised Cross-Modality Adaptation for 3D Medical Image Segmentation
by [Jianghao Wu](https://jianghaowu.github.io/), et.al.
## Introduction
This repository is for our IEEE TMI paper **FPL+: Filtered Pseudo Label-based Unsupervised Cross-Modality Adaptation for 3D Medical Image Segmentation**.

## Data Preparation
### Dataset
[ Vestibular Schwannoma Segmentation Dataset](https://www.nature.com/articles/s41597-021-01064-w) | [BraTS 2020](https://www.med.upenn.edu/cbica/brats2020/data.html) | [MMWHS](http://www.sdspeople.fudan.edu.cn/zhuangxiahai/0/mmwhs/)
For VS dataset, preprocess original data according to `./data/preprocess_vs.py`.
### Cross domian data augmentation
Training [CycleGAN](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix), and convert source domain data into source domian-like set and target domian-like set, refer the folder `./dataset`.
### File Organization
Using `./write_csv.py` to write your data into a `csv` file
For vs data, ceT1 as the source domain, hrT2 as the target domain, the`csv `file can be seen in `./config_dual/data_vs`:
```
├──config_dual/data_vs
├── [train_ceT1_like.csv]
├──image,label
├──./dataset/ceT1/img/vs_gk_99_t1.nii.gz,./dataset/ceT1/lab/vs_gk_99_t1_seg.nii.gz
├──./dataset/fake_data/ceT1-hrT2-ceT1_cc/vs_gk_99_t1.nii.gz,./dataset/ceT1/lab/vs_gk_99_t1.nii.gz
├──./dataset/fake_data/ceT1-hrT2-ceT1_ac/vs_gk_99_t1.nii.gz,./dataset/ceT1/lab/vs_gk_99_t1.nii.gz
...
├── [train_hrT2_like.csv]
├──image,label
├──./dataset/fake_data/ceT1-hrT2_cyc/vs_gk_99_t1.nii.gz,./dataset/ceT1/lab/vs_gk_99_t1.nii.gz
├──./dataset/fake_data/ceT1-hrT2_auxcyc/vs_gk_99_t1.nii.gz,./dataset/ceT1/lab/vs_gk_99_t1.nii.gz
...
```
## Training and Testing
### Train pseudo labels generator and get pseudo label
Write your training config file in `config_dual/vs_t1s_g.cfg`
```
export CUDA_VISIBLE_DEVICES=0
export PYTHONPATH=$PYTHONPATH:./PyMIC
## train pseudo label generator
python ./PyMIC/pymic/net_run_dsbn/net_run.py train ./config_dual/vs_t1s_g.cfg
## get pseudo label
python ./PyMIC/pymic/net_run_dsbn/net_run.py test ./config_dual/vs_t1s_g.cfg
## get the pseudo label of fake source image
python ./PyMIC/pymic/net_run_dsbn/net_run.py test ./config_dual/vs_t1s_g_fake.cfg
## get image-level weights
python ./PyMIC/pymic/net_run_dsbn/net_run.py test ./config_dual/vs_t1s_weights.cfg
```
Weights are saved on `[testing][fpl_uncertainty_sorted]` and `[testing][fpl_uncertainty_weight]`, run:
```
python data/get_pixel_weight.py
python data/get image_weight.py
```
### Train final segmentor
```
export CUDA_VISIBLE_DEVICES=0
export PYTHONPATH=$PYTHONPATH:./PyMIC
python ./PyMIC/pymic/net_run_dsbn/net_run.py train ./config_dual/vs_t1s_S.cfg
python ./PyMIC/pymic/net_run_dsbn/net_run.py test ./config_dual/vs_t1s_S.cfg
```
## Citation
If you find this project useful for your research, please consider citing:
```bibtex
@article{wu2024fpl+,
title={FPL+: Filtered Pseudo Label-based Unsupervised Cross-Modality Adaptation for 3D Medical Image Segmentation},
author={Wu, Jianghao and Guo, Dong and Wang, Guotai and Yue, Qiang and Yu, Huijun and Li, Kang and Zhang, Shaoting},
journal={IEEE Transactions on Medical Imaging},
year={2024},
publisher={IEEE}
}
```