GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lakshay42/3DUnetCNN: Keras 3D U-Net Convolution Neural Network (CNN) designed for medical image segmentation

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

78 Commits
78 Commits

Folders and files

NameName
Last commit message
Last commit date
brats
brats
 
 
doc
doc
 
 
iseg
iseg
 
 
unet3d
unet3d
 
 
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

3D U-Net Convolution Neural Network with Keras

Background

Designed after this paper on volumetric segmentation with a 3D U-Net. Currently, the network does not have the B-Spline deformations that are mentioned in the paper. If you figure out a way to apply these to a 3D Keras CNN, let me know! PRs are always welcome!

The code was written to be trained using the BRATS data set for brain tumors, but it can be easily modified to be used in other 3D applications. To adapt the network, you might have to play with the input size to get something that works for your data.

I used Bohdan Pavlyshenko's Kaggle kernel for 2D U-Net segmentation as a base for this 3D U-Net.

How to Train Using BRATS Data

  1. Download the BRATS 2015 data set.
  2. Install dependencies: nibabel, keras, pytables, nilearn
  3. Install ANTs N4BiasFieldCorrection and add the location of the ANTs binaries to the PATH environmental variable.
  4. Convert the data to nifti format and perform image wise normalization and correction:
$ cd brats

Import the conversion function:

>>> from preprocess import convert_brats_data

Import the configuration dictionary:

>>> from config import config
>>> convert_brats_data("/path/to/BRATS/BRATS2015_Training",  config["data_dir"])

Where config["data_dir"] is the location where the raw BRATS data will be converted to.

  1. Run the training:
$ cd ..
$ export PYTHONPATH=${PWD}:$PYTHONPATH
$ python brats/train.py

Configuration

In training I have found that this network requires a large amount of memory! For an image shape of 144x144x144 the memory required when training using cpu is around 32GB. This can be reduced by reducing the image shape in the configuration file. The code will then reduce the resolution of the input images so that they all match the given shape.

About

Keras 3D U-Net Convolution Neural Network (CNN) designed for medical image segmentation

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.