Skip to content
/ UNET Public
forked from mfroeling/UNET

A package to generate and train a UNET deep convolutional network for 2D and 3D image segmentation

License

Notifications You must be signed in to change notification settings

rohitn/UNET

 
 

UNET

DOI contributions welcome Hits

A package to generate and train a UNET deep convolutional network for 2D and 3D image segmentation

Information

UNET is developed for Mathematica. It contains the following toolboxes:

  • UnetCore
  • UnetSupport

Documentation of all functions and their options is fully integrated in the Mathematica documentation. The toolbox always works within the latest version of Mathematica and does not support any backward compatibility.

All code and documentation is maintained and uploaded to github using Workbench.

Install toolbox

Install the toolbox in the Mathematica UserBaseDirectory > Applications.

FileNameJoin[{$UserBaseDirectory, "Applications"}]

Using the toolbox

The toolbox can be loaded by using <<UNET`

The notbook UNET.nb shows examples of how to use the toolbox on artificially generated 2D data. There are also examples how to visualize the layer of your trained network and how to visualize the training itself.

Functionality

The network supports multi channel inputs and multi class segmentation.

  • UNET generates a UNET convolutional network.

    • 2D UNET
      UNET 2D
    • 3D UNET
      UNET 3D
    • Loss Layers: Training the data is done using two loss layers: a SoftDiceLossLayer, BrierLossLayer and a CrossEntropyLossLayer.
      SoftDiceLossLayer, BrierLossLayer and a CrossEntropyLossLayer
  • Convuluation blocks: The toobox contains five different convolution blocks that build up the network: UNET, UResNet, RestNet, UDenseNet, DensNet.
    split data

  • Network complexity for each of the blocks and for 2D and 3D UNET.
    UNET complexity

  • SplitTrainData splits the data and labels into training, validation and test data.
    split data

  • TrainUNET trains the network.
    Train Unet

  • Training is done with random batch selection that allows for on the fly data augmentation.
    Train Unet

Visualization

  • Visualize the network and results
    • Visualize the layers
      Visualize the net layers
    • Results
      Visualize training results
    • Visualize the training
      animate unet training process
      animate unet training process muscle

Example

*Example: 3D segmentation of lower leg muscles using MRI data.
Automated 3D muscle segmentation using UNET / RESNET using DIXON MRI data

License

https://opensource.org/licenses/MIT

Some code was based on https://github.com/alihashmiii/UNet-Segmentation-Wolfram

About

A package to generate and train a UNET deep convolutional network for 2D and 3D image segmentation

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Mathematica 100.0%