Giter Club home page Giter Club logo

airway-summerschool-2022's Introduction

Airway Segmentation Tutorial --- IMR-Summer-School

Dataset

Dataset Folder Structure

BAS
└───train
│   │   case1
│   │   case2
│   └───casex
│       │   input
│       │   mask
│       │   processed
│           │   casex_clean.nii
│           │   casex_label.nii
│           └───casex_box.npy
│   
└───test
    │   case1
    │   case2

Use the casex_clean.nii for input CT volumes and the corresponding casex_label.nii for the ground-truth. For space room saving, the input and mask folder may be discarded.

How to visualize the Medical images

Get Start!

  1. First, we provide a Demo Inference with a baseline trained weight file that helps you get familiar with the airway prediction procedure via the CNN output.

    The entrance is at main_code/scripts/Demo_Inference/demo_test.py. You can try the following command:

    python demo_test.py --input_path $INPUT_PATH --output_path $OUTPUT_PATH
    

    You could use the ITK-SNAP / 3D-Slicer or any visualization tools to check your results.

  2. Second, we provide a Train Pipeline that helps you train the airway tree modeling task.

    The entrance is at main_code/pipeline/pipeline_train_airway_IMR-Summer-School-2022.py. You can try the following command:

    python pipeline_train_airway_IMR-Summer-School-2022.py --dataroot $DATASET_DIR --name $EXPERIMENT_NAME --checkpoints_dir $MODEL_LOADDIR \ 
    --model $MODEL --dataset_mode $DATASET_MODE --in_channels $INPUT_CH --out_channels $OUTPUT_CH --gpu_ids $GPU_IDS --suffix $SUFFIX  
    

    TIPS: the detailed arguments for base configures and training procedures are in *** main_code/options/base_options*** and main_code/options/train_options respectively. Please refer to these two files and specify the arguments in the default settings or the command line.

  3. Third, we provide some ports for you to extend the project. Specifically,

    • Data Augmentation: In main_code/dataloader/airway_dataset.py, you can conduct extra data augmentation.
    • Loss Function: In main_code/util/losses.py, you can construct other loss functions and call it in the *** main_code/models/unet3d_model.py***
    • Model Design: In main_code/models/ you can design your own models inherited from the base_model and use the modules in the main_code/models/networks.py

Environment

Python >= 3.8. The deep learning framework is PyTorch=1.11.0 and Torchvision = 0.12.0

Some python libraries are also necessary, you can use the following command to set up.

pip install -r requirements.txt

airway-summerschool-2022's People

Contributors

puzzled-hui 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.