UNET
UNET copied to clipboard
A package to generate and train a UNET deep convolutional network for 2D and 3D image segmentation
UNET
Notice
This package will no longer be developed!
Its main functionality generating UNETs has been integrated in QMRITools in the SegmentationTools package. The last update included a more flexible down sampling schedule for and some other customizations for UNET generation. It has been a playground for development learning and testing.
A package to generate and train a UNET deep convolutional network for 2D and 3D image segmentation
- Information
- Install toolbox
- Using the toolbox
- Functionality
- Visualization
- Example
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.
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 notebook 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
- 3D UNET
- Loss Layers: Training the data is done using two loss layers: a SoftDiceLossLayer, BrierLossLayer and a CrossEntropyLossLayer.
- 2D UNET
-
Convolution blocks: The toolbox contains five different convolution blocks that build up the network: UNET, UResNet, RestNet, UDenseNet, DensNet.
-
Network complexity for each of the blocks and for 2D and 3D UNET.
-
SplitTrainData splits the data and labels into training, validation and test data.
-
TrainUNET trains the network.
-
Training is done with random batch selection that allows for on the fly data augmentation.
Visualization
- Visualize the network and results
- Visualize the layers
- Results
- Visualize the training
- Visualize the layers
Example
*Example: 3D segmentation of lower leg muscles using MRI data.
License
Some code was based on this blog post