Coder Social home page Coder Social logo

mrinaljain17 / ct-image-segmentation Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 2.0 13.85 MB

Segmentation in Head and Neck CT images. Report - https://github.com/MrinalJain17/CT-image-segmentation/blob/master/reports/Report.pdf

License: GNU General Public License v3.0

Python 5.95% Jupyter Notebook 94.05%
pytorch 3d-image-segmentation u-net deep-learning

ct-image-segmentation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ct-image-segmentation's Issues

Implement transformations for Miccai 2D

The transformations should be applied to both images and the masks (except like normalization)

  • Windowing: Use brain, bone, and soft tissue windowing as 3 stacked channels. Added in #22
  • Normalization: Get normalized values corresponding to each windowing type. Done in commit d7996cc
  • Defaults: Implement some set of base/default transformations that can be used directly in a dataloader. Added a sample in commit 5538bc1. Other transformations can be experimented later, with a similar format.

Analyse pixel value distribution within different regions/structures

For example: how are the pixels inside a "Mandible" are distributed?

This will be at two levels:

  1. For individual patients, how does the pixel (or "voxel") value vary across different regions. Added in commit e0505dc
  2. Across all patients, what's the distribution of these pixels for each region. *Added in commit 7dca68e

This could also be useful for creating very simple baseline models, essentially based on stuff like thresholding. Will also be helpful for windowing.

Explore windowing

Is windowing needed?

  • How will it help? - We might want to "highlight" certain regions for better segmentation.
  • Possible add functionality to perform windowing to the existing Patient or Volume classes. A better way would be to use windowing as PyTorch transformations (with some sort of randomization).

Need more discussion!

Fix the train/valid split errors

For some reason, based on the default splitting (taken from actual competition), all the scans in the validation set are without mandible annotation. This can be fixed by simply resampling the examples from the combined train and validation sets, effectively creating new splits.

Note that the test data should not be used at any cost for this.

Using Albumentations in datasets.py

Does the transform we apply in the getitem to the images/masks include a collection of transformations already or do we need to add a loop if we want to have more than one transformation? (have not used Albumentations before)

Explore resampling - like each voxel representing 1mm x 1mm x 1mm

This is definitely important for 3D models.

  • Even for 2D models, if we want to crop unnecessary pixels (chest region, the CT scanner artifacts, etc), it might important to have all the scans on the same scale.

Code would be something along the lines of:

from scipy.ndimage import zoom

patient = ...

required_spacing = np.array([1., 1., 1.])
resize_factor = patient.image.spacing / required_spacing
vol = patient.image.as_numpy()[0]

resampled = zoom(vol, resize_factor, order=2, mode="nearest")
  • Resampling could be really slow!

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.