Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update 3D example #267

Merged
merged 2 commits into from
Sep 28, 2020
Merged

update 3D example #267

merged 2 commits into from
Sep 28, 2020

Conversation

hasibzunair
Copy link
Contributor

@hasibzunair hasibzunair commented Sep 28, 2020

Addresses #251.

I made the training pipeline stable by doing the following:

  • Rescale the HU values before performing any operation (downsample, augmentation). Rescaling the raw values after downsampling or augmentation adds artifacts.
  • Downsample all dimensions of the volume at once. Previously width and height downsampling was followed by depth/z-axis.
  • Removes blur operations. Tends to hurt performance as it makes it difficult to detect opacifications.

Example was run 10 times. The model achieved a mean ACC of 79.74+/-0.034.

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR -- looks good to me! You can add the generated file after addressing the comments.

Lastly, split the dataset into train and validation subsets.
"""

# Read and process the scans.
# Each scan is resized across width, height, and depth.
# Each scan is resized across width, height, and depth and rescaled.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually height is before width

preprocessing and augmentation techniques out there, this example shows a few
simple ones to get started.
The CT scans also augmented by rotating at random angles during training. Since there are
no channels present in the data, a channel of 1 is added to perform 3D convolutions on the data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Since the data is stored in rank-3 tensors of shape (samples, height, width, depth), we add a dimension of size 1 at axis 4 to be able to perform 3D convolutions on the data. The new shape is thus (samples, height, width, depth, 1)."

Copy link
Contributor

@fchollet fchollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fchollet fchollet merged commit fd83343 into keras-team:master Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants