Coder Social home page Coder Social logo

k-cross's Introduction

KAID

KAID implementation

Preliminary

Dependency

conda install pytorch=1.8.1 torchvision torchaudio cudatoolkit=10.1 -c pytorch
pip3 install -r requirements.txt

Generate dataset

python3 data_preprecess/brats2021.py

Prepare statistics for FID metric. See ./fid_stats/gen_fid_stats.py for details.

python3 ./fid_stats/gen_fid_stats.py --dataset 'ixi'  --source-domain 't2' --target-domain 'pd' --gpu-id 0

Options. See ./configuration/config.py for details.

--fid [default=true]
--noise-type 'slight'/'severe' [default='normal'] 
--identity [default=true]
--diff-privacy [default=true]
--debug --save-img --single-img-infer 
--save-model --load-model --load-model-dir './work_dir/centralized/ixi/Tue Jan 11 20:18:31 2022'

Centralized Training

BraTS2021 ['t1', 't2', 'flair']

python3 centralized_training.py --dataset 'brats2021' --model 'cyclegan' --source-domain 't1' --target-domain 'flair' --data-path '/disk1/medical/brats2021/training' --valid-path '/disk1/medical/brats2021/validation'

IXI ['t2', 'pd']

python3 centralized_training.py --dataset 'ixi' --model 'cyclegan' --source-domain 'pd' --target-domain 't2' --data-path '/disk1/medical/ixi' --valid-path '/disk1/medical/ixi'  

KAID Training

python3 kaid.py --dataset 'ixi' --source-domain 'pd' --target-domain 't2' -g 1  --data-path '/disk/medical/ixi' --valid-path '/disk/medical/ixi' --nirps-path '/disk/medical/nirps_dataset' --train --num-epochs 30 --method 'normal'  

KAID Validation

python3 kaid.py --dataset 'ixi' --source-domain 'pd' --target-domain 't2' -g 1  --data-path '/disk/medical/ixi' --valid-path '/disk/medical/ixi'  --nirps-path '/disk/medical/nirps_dataset' --validate --method 'normal' --diff 'l2'

NIRPS Dataset Build Up

IXI ['t2', 'pd']

python3 generate_nirps_dataset.py --dataset 'ixi' --data-path '/disk/medical/ixi' --valid-path '/disk/medical/ixi' --model 'cyclegan' --source-domain 't2' --target-domain 'pd' -g 3 --num-epoch 30

BraTS2021 ['t1', 't2', 'flair']

python3 genrrate_nirps_dateset.py --dataset 'brats2021' --data-path '/disk/medical/brats2021/training' --valid-path '/disk/medical/brats2021/validation' --model 'cyclegan' --source-domain 't1' --target-domain 't2' -g 2 --num-epoch 30

Implementations of Data Processing

Sereval modes are described in the new settings of FedMed.

To reveal the real-world sitation in hosptials, datastream is organized as follows.

Load NIPRS Dataset, Generate Error Map, and Calculate Base Score for Human Judgement

python3 generate_nirps_err_map.py

Human Judgement

python3 artificial_scoring_system.py

Metric Consistency

python3 metric_consistency.py

k-cross's People

Contributors

guoyang-xie avatar jinbao-wang avatar fedmed-meta avatar

Watchers

 avatar

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.