Git Product home page Git Product logo

3d-cps's Introduction

3D-CPS

Codes for the paper: "3D Cross-Pseudo Supervision (3D-CPS): A semi-supervised nnU-Net architecture for abdominal organ segmentation" by Yongzhi Huang*, Hanwen Zhang*, Yan Yan and Haseeb Hassan.

3D-CPS

Dataset and Challenge

Fast and Low-resource semi-supervised Abdominal oRgan sEgmentation in CT (FLARE 2022)

Usage

Our framework is based on nnU-Net, so we strongly recommend you have a look at the repository of nnU-Net before starting with our code.

Dataset Conversion

nnU-Net expects datasets in a structured format like the data structure of the Medical Segmentation Decthlon. The first step is to build dataset.json using dataset_convErsion.TaskXXX_TASKNAME.py.

Experiment planning and preprocessing

We follow the network structure and other hyper-parameter settings automatically generated by nnU-Net, so the default ExperimentPlanner is enough.

python nnUNet_plan_and_preprocess.py -t TASK_ID --ssl

If you want to change any properties related to models or training hyper-parameters, you can inherit and override Class ExperimentPlanner3D_v21/ExperimentPlanner2D_v21, and modify the Class Trainer (In our work, it's nnUNetTrainerV2_SSL) accordingly. For more details, please refer to this guide in the nnU-Net repository.

python nnUNet_plan_and_preprocess.py -t TASK_ID -p YOUR_EXP_PLANNER --ssl

Model training

  • 2D version:

    python run_training.py 2d nnUNetTrainerV2_SSL TASK_ID FOLD

  • 3D version:

    python run_training.py 3d_fullres nnUNetTrainerV2_SSL TASKID FOLD

Inference

  • 2D version

    python predict_simple.py -i INPUT_DIR -o OUTPUT_DIR -f FOLD -t TASK_ID -m 3d_fullres -tr nnUNetTrainerV2_SSL -p nnUNetPlansv2.1 -chk model_best

  • 3D version:

    python predict_simple.py -i INPUT_DIR -o OUTPUT_DIR -f FOLD -t TASK_ID -m 2d -tr nnUNetTrainerV2_SSL -p nnUNetPlansv2.1 -chk model_best

Reference

3d-cps's People

Contributors

yhuang1997 avatar

Stargazers

zongyul avatar  avatar

Watchers

 avatar

3d-cps's Issues

关于数据集划分

您好,在您的代码我对有标签和无标签数据的划分存在一些问题,您时候可以提供FLARE2022数据集对应的dataset.json、split_final.pkl、nnUNetPlansv2.1_plans_2D.pkl文件?
邮箱:[email protected]
十分感谢

Validation Loss curve is different from vanilla nnUNet

Hi team,

I found something something confused.

Compared with the vanilla nnUNet, the validation Loss curve seems like does not align with the training loss curve (it doesn't decrease that much as training loss curve.) See below

3D-CPS:
progress_3D-cps

vanilla nnUNet:

unet

This issue lets the performance cannot compared with vanilla nnUNet. I believe I must messed up something.

Is that because I'm using FOLD = ['all'] for evaluation? If so, should I set a splits_final.pkl and let the fold = 1 be the some labeled training data and use fold = 1 to evaluate?

nnUNet_plan_and_preprocess getting super slow after finishing cropping

After running python nnUNet_plan_and_preprocess.py -t TASK_ID --ssl

The data finished cropping and code try to generate dataset_properties.pkl in the cropped folder.

In the collect_intensity_properties() function of class DatasetAnalyzerSSL,
it takes a lot of time on processing the following line

v = p.starmap(self._get_voxels, zip(self.patient_identifiers, [mod_id] * len(self.patient_identifiers)))

See line 287

I have 191 labeled data and 763 unlabeled data in total, the average shape of these data is (1,255,512,512) in the form of (c,d,h,w)

Even with a Intel(R) Xeon(R) Platinum 8360Y CPU on my HPC, is still takes days to process.

Is there any way to boost the data preprocessing? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.