Git Product home page Git Product logo

ctlungsegmentationunet's Introduction

Project description

In this project, we will per form lung segmentation on 3D CT volumes using 2D UNet architecture.

Dataset

We use 150 CT volumes (75 patients) for training, 20 volumes (10 patients) for validation and 12 volumes for testing predictions. Note that dataset is separated on subject-level and not volume-level to keep the evaluation unbiased.

Mask Generation

To generate the segmentation label mask, we used 3D slicer software along with NVidia AI Assisted Annotation tool (can be installed as an extension in 3D slicer) to speed up the process. Manual segmentation on each slice for 170 volumes can take forever. Thanks to NVidia researchers for developing this tool which helped me to generate these masks in 2 days instead of months.

Data preprocessing

First of all convert 3D data into 2D slices and store them. The code is provided in 'Data preprocessing' notebook. Set your data paths accordingly. The resulting dataset consisted of 176,884 slices for training and 23,298 slices for validation purpose.

Training

Before starting training, make sure your data structure looks like this.

|-- data_slices
    |-- train
        |-- masks
            |-- img
        |-- slices
            |-- img
            
    |-- valid
        |-- masks
            |-- img
        |-- slices
            |-- img

After that we can prepare our UNet mdoel and train it on our dataset. We can also visualize our models predictions on the validation dataset. The code is provided in the 'Model training' notebook.

Prediction

We can use also make and visualize predicitons on the test data. The notebooks are provided.

ctlungsegmentationunet's People

Contributors

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