U-net consists of a contracting
path (left side) and an expansive path (right side).
The contracting path follows
the typical architecture of a convolutional network. It consists of the repeated
application of two 3x3 convolutions (unpadded convolutions), each followed by
a rectied linear unit (ReLU) and a 2x2 max pooling operation with stride 2
for downsampling.
At each downsampling step we double the number of feature
channels.
Every step in the expansive path consists of an upsampling of the
feature map followed by a 2x2 convolution ("up-convolution") that halves the number of feature channels, a concatenation with the correspondingly cropped
feature map from the contracting path, and two 3x3 convolutions, each followed by a ReLU.
The cropping is necessary due to the loss of border pixels in
every convolution. At the final layer a 1x1 convolution is used to map each 64-component feature vector to the desired number of classes. In total the network has 23 convolutional layers.
To allow a seamless tiling of the output segmentation map (see Figure 2), it is important to select the input tile size such that all 2x2 max-pooling operations are applied to a layer with an even x- and y-size.
In this repo, I implemented U-net using Pytorch and Python 3.6.7.
Except depth
, all parameters are same as paper. Default value of depth
in paper is 5
(look at the shape at top of page). So you can have deeper or shallower network by changing deep
variable.
Convolutional Networks for Biomedical Image Segmentation (Ronneberger et al., 2015)
Please cite this project as Nikan Doosti. (2020). Nikronic/CoarseNet: DOI Release (v0.1-alpha). Zenodo. https://doi.org/10.5281/zenodo.3838582