Giter Site home page Giter Site logo

imageflowtech / ukbb-gnc-abdominal-segmentation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from biomedia/ukbb-gnc-abdominal-segmentation

0.0 0.0 0.0 20 KB

Abdominal Organ Segmentation of UK Biobank and GNC Studies

License: Apache License 2.0

Python 100.00%

ukbb-gnc-abdominal-segmentation's Introduction

Abdominal Organ Segmentations of UK Biobank (UKBB) and German National Cohort (GNC) Studies

Getting Started

Abdominal organ segmentations for UKBB and GNC studies can be obtained with 4 straightforward steps below.

Obtaining Predictions

Arguments

Folder names can be set as preferred. Details of arguments that will be used in the script are as follows:

zip_folder        = Folder that contains downloaded zip files for each subject. 
nifti_folder      = Folder that contains subjects with stitched volumes as .nii.gz files
nnunet_folder     = Folder that contains subjects formatted for nnUNet
prediction_folder = Folder that contains final predictions
output_folder     = Folder that contains predictions with the original naming
dataset_name      = Either ukbb or gnc
num_channels      = Either 1 or 4

Step 0: Download data

Download and put whole-body MRI data into a single directory

Step 1: Run extract_ukbb.py or extract_gnc.py

This is the initial pre-processing step (only run either UKBB or GNC script depending on your source of data).

python extract_ukbb.py 
    --zip_folder my_original_data/ 
    --nifti_folder my_nifti_data/

Step 2: Run convert2nnunet.py

The script converts files to the nnUNet naming.

python convert2nnunet.py 
    --nifti_folder my_nifti_data/ 
    --nnunet_folder my_nnunet_data/ 
    --dataset_name ukbb 
    --num_channels 4

Step 3: Run predict.py

The script generates the predictions for abdominal organs (example below is for UKBB with 4-channel model).

CUDA_VISIBLE_DEVICES=0 
RESULTS_FOLDER=models/ 
python predict.py 
    --nnunet_folder my_nnunet_data/ 
    --prediction_folder my_predictions/ 
    --dataset_name ukbb 
    --num_channels 4

Step 4: Run convert2original.py

The script converts predictions back to the original naming.

python convert2original.py 
    --prediction_folder my_predictions/ 
    --output_folder my_outputs/

All organ segmentations are saved into the output folder with their original naming convention.

ukbb-gnc-abdominal-segmentation's People

Contributors

turkaykart 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.