SyntheticTumors

MrGiovanni活跃维护

用生成模型合成带标注的肝脏肿瘤 CT 图像,无需人工标注即可训练分割模型,缓解医学影像标注成本高的问题。

[CVPR 2023] Label-Free Liver Tumor Segmentation

暂无版本379star27fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/MrGiovanni/SyntheticTumors.git
cd SyntheticTumors
wget https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/model_swinvit.pt
硬件要求按 README 说明

README 未明确说明显存要求,训练命令均通过 CUDA_VISIBLE_DEVICES 指定 GPU,未提及 CPU 运行或具体 GPU 型号

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用合成肝脏肿瘤替代真实标注训练分割模型,缓解医学影像标注稀缺问题

用生成模型合成带标注的肝脏肿瘤 CT 图像,无需人工标注即可训练分割模型,缓解医学影像标注成本高的问题。

核心能力

  • 用无标注健康肝脏数据合成肿瘤样本
  • 提供 UNet 与 Swin-UNETR 多尺寸模型训练脚本
  • 合成肿瘤训练效果接近真实肿瘤训练
  • 附预训练权重与验证评估脚本
  • 支持多卡分布式训练与缓存加速

容易踩的坑

需额外下载 SwinViT 预训练权重 model_swinvit.pt 才能使用 --use_pretrained;训练脚本中的 datapath 需改为自己的数据路径;完整安装依赖需参考 INSTALL.md,README 未列出具体依赖版本

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    visitors GitHub Repo stars Subscribe us: https://groups.google.com/u/2/g/bodymaps

    This repository provides extensive examples of synthetic liver tumors generated by our novel strategies. Check to see if you could tell which is real tumor and which is synthetic tumor. More importantly, our synthetic tumors can be used for training AI models, and have proven to achieve performance in real tumor segmentation similar to a model trained on real tumors.

    Amazing, right?

    Paper

    Label-Free Liver Tumor Segmentation Qixin Hu1, Yixiong Chen2, Junfei Xiao3, Shuwen Sun4, Jieneng Chen3, Alan L. Yuille3, and Zongwei Zhou3,* 1 Huazhong University of Science and Technology, 2 The Chinese University of Hong Kong -- Shenzhen, 3 Johns Hopkins University, 4 The First Affiliated Hospital of Nanjing Medical University CVPR, 2023 paper | code | talk (by Alan Yuille) | talk | slides | poster

    Synthetic Tumors Make AI Segment Tumors Better Qixin Hu1, Junfei Xiao2, Yixiong Chen3, Shuwen Sun4, Jieneng Chen2, Alan L. Yuille2, and Zongwei Zhou2,* 1 Huazhong University of Science and Technology, 2 Johns Hopkins University, 3 The Chinese University of Hong Kong -- Shenzhen, 4 The First Affiliated Hospital of Nanjing Medical University Medical Imaging Meets NeurIPS, 2022 paper | code | slides | poster | demo | talk

    Early Detection and Localization of Pancreatic Cancer by Label-Free Tumor Synthesis Bowen Li1, Yu-Cheng Chou1, Shuwen Sun2, Hualin Qiao3, Alan L. Yuille1, and Zongwei Zhou1,* 1 Johns Hopkins University, 2 The First Affiliated Hospital of Nanjing Medical University, 3 Sepax technologies Big Task Small Data, 1001-AI, MICCAI Workshop, 2023 paper | code

    We have documented common questions for the paper in Frequently Asked Questions (FAQ).

    We have also provided a list of publications related to tumor synthesis in Awesome Synthetic Tumors Awesome.

    Model

    TumorModelPre-trained?Download
    realunetnolink
    realswin_unetrv2_baseyeslink
    realswin_unetrv2_basenolink
    realswin_unetrv2_smallnolink
    realswin_unetrv2_tinynolink
    syntunetnolink
    syntswin_unetrv2_baseyeslink
    syntswin_unetrv2_basenolink
    syntswin_unetrv2_smallnolink
    syntswin_unetrv2_tinynolink

    Use the following command to download everything.

    wget https://www.dropbox.com/s/jys4tt2ttmr7ig1/runs.tar.gz
    tar -xzvf runs.tar.gz
    

    0. Installation

    git clone https://github.com/MrGiovanni/SyntheticTumors.git
    cd SyntheticTumors
    wget https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/model_swinvit.pt
    

    See installation instructions.

    1. Train segmentation models using synthetic tumors

    datapath=/mnt/zzhou82/PublicAbdominalData/
    
    # UNET (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=unet --val_every=200 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12235 --cache_num=200 --val_overlap=0.5 --syn --logdir="runs/synt.no_pretrain.unet" --train_dir $datapath --val_dir $datapath --json_dir datafolds/healthy.json
    # Swin-UNETR-Base (pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=base --val_every=200 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12231 --cache_num=200 --val_overlap=0.5 --syn --logdir="runs/synt.pretrain.swin_unetrv2_base" --train_dir $datapath --val_dir $datapath --json_dir datafolds/healthy.json --use_pretrained
    # Swin-UNETR-Base (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=base --val_every=200 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12231 --cache_num=200 --val_overlap=0.5 --syn --logdir="runs/synt.no_pretrain.swin_unetrv2_base" --train_dir $datapath --val_dir $datapath --json_dir datafolds/healthy.json
    # Swin-UNETR-Small (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=small --val_every=200 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12233 --cache_num=200 --val_overlap=0.5 --syn --logdir="runs/synt.no_pretrain.swin_unetrv2_small" --train_dir $datapath --val_dir $datapath --json_dir datafolds/healthy.json
    # Swin-UNETR-Tiny (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=tiny --val_every=200 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12234 --cache_num=200 --val_overlap=0.5 --syn --logdir="runs/synt.no_pretrain.swin_unetrv2_tiny" --train_dir $datapath --val_dir $datapath --json_dir datafolds/healthy.json
    

    2. Train segmentation models using real tumors (for comparison)

    datapath=/mnt/zzhou82/PublicAbdominalData/
    
    # UNET (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=unet --val_every=200 --val_overlap=0.5 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12235 --cache_num=200 --logdir="runs/real.no_pretrain.unet" --train_dir $datapath --val_dir $datapath --json_dir datafolds/lits.json
    # Swin-UNETR-Base (pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=base --val_every=200 --val_overlap=0.5 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12231 --cache_num=200 --logdir="runs/real.pretrain.swin_unetrv2_base" --train_dir $datapath --val_dir $datapath --json_dir datafolds/lits.json --use_pretrained
    # Swin-UNETR-Base (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=base --val_every=200 --val_overlap=0.5 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12232 --cache_num=200 --logdir="runs/real.no_pretrain.swin_unetrv2_base" --train_dir $datapath --val_dir $datapath --json_dir datafolds/lits.json
    # Swin-UNETR-Small (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=small --val_every=200 --val_overlap=0.5 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12233 --cache_num=200 --logdir="runs/real.no_pretrain.swin_unetrv2_small" --train_dir $datapath --val_dir $datapath --json_dir datafolds/lits.json
    # Swin-UNETR-Tiny (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore -W ignore main.py --optim_lr=4e-4 --batch_size=2 --lrschedule=warmup_cosine --optim_name=adamw --model_name=swin_unetrv2 --swin_type=tiny --val_every=200 --val_overlap=0.5 --max_epochs=4000 --save_checkpoint --workers=2 --noamp --distributed --dist-url=tcp://127.0.0.1:12234 --cache_num=200 --logdir="runs/real.no_pretrain.swin_unetrv2_tiny" --train_dir $datapath --val_dir $datapath --json_dir datafolds/lits.json
    

    3. Evaluation

    AI model trained by synthetic tumors
    datapath=/mnt/zzhou82/PublicAbdominalData/
    
    # UNET (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=unet --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/synt.no_pretrain.unet --save_dir out
    # Swin-UNETR-Base (pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=base --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/synt.pretrain.swin_unetrv2_base --save_dir out
    # Swin-UNETR-Base (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=base --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/synt.no_pretrain.swin_unetrv2_base --save_dir out
    # Swin-UNETR-Small (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=small --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/synt.no_pretrain.swin_unetrv2_small --save_dir out
    # Swin-UNETR-Tiny (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=tiny --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/synt.no_pretrain.swin_unetrv2_tiny --save_dir out
    
    AI model trained by real tumors
    datapath=/mnt/zzhou82/PublicAbdominalData/
    
    # UNET (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=unet --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/real.no_pretrain.unet --save_dir out
    # Swin-UNETR-Base (pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=base --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/real.pretrain.swin_unetrv2_base --save_dir out
    # Swin-UNETR-Base (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=base --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/real.no_pretrain.swin_unetrv2_base --save_dir out
    # Swin-UNETR-Small (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=small --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/real.no_pretrain.swin_unetrv2_small --save_dir out
    # Swin-UNETR-Tiny (no.pretrain)
    CUDA_VISIBLE_DEVICES=0 python -W ignore validation.py --model=swin_unetrv2 --swin_type=tiny --val_overlap=0.75 --val_dir $datapath --json_dir datafolds/lits.json --log_dir runs/real.no_pretrain.swin_unetrv2_tiny --save_dir out
    

    TODO

    • Upload the paper to arxiv
    • Make a video about Visual Turing Test (will appear in YouTube)
    • Make an online app for Visual Turing Test
    • Apply for a US patent
    • Upload the evaluation code for small tumors
    • Upload the evaluation code for the false-positive study
    • Make a Jupyter Notebook for tumor synthesis

    Citation

    @inproceedings{hu2023label,
      title={Label-free liver tumor segmentation},
      author={Hu, Qixin and Chen, Yixiong and Xiao, Junfei and Sun, Shuwen and Chen, Jieneng and Yuille, Alan L and Zhou, Zongwei},
      booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
      pages={7422--7432},
      year={2023},
      doi={10.1109/CVPR52729.2023.00717}
    }
    
    @inproceedings{hu2022synthetic,
      title={Synthetic Tumors Make AI Segment Tumors Better},
      author={Hu, Qixin and Xiao, Junfei and Chen, Yixiong and Sun, Shuwen and Chen, Jie-Neng and Yuille, Alan and Zhou, Zongwei},
      booktitle={NeurIPS Workshop on Medical Imaging Meets NeurIPS},
      year={2022}
    }
    
    @article{li2023early,
      title={Early Detection and Localization of Pancreatic Cancer by Label-Free Tumor Synthesis},
      author={Li, Bowen and Chou, Yu-Cheng and Sun, Shuwen and Qiao, Hualin and Yuille, Alan and Zhou, Zongwei},
      journal={arXiv preprint arXiv:2308.03008},
      year={2023}
    }
    

    Acknowledgement

    This work was supported by the Lustgarten Foundation for Pancreatic Cancer Research and the McGovern Foundation. The segmentation backbone is based on Swin UNETR; we appreciate the effort of the MONAI Team to provide and maintain open-source code to the community. We thank Camille Torrico and Alexa Delaney for improving the writing of this paper. Paper content is covered by patents pending.