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 — small corrections · flury/DeepLearningTutorials@22258be

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc
    • unet.txt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/unet.txt‎

Copy file name to clipboardExpand all lines: doc/unet.txt
+41-45Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,40 @@ U-Net
44
**********************************************
55

66
.. note::
7-
This section assumes the reader has already read through :doc:`lenet` for
7+
This section assumes the reader has already read through :doc:`lenet` for
88
convolutional networks motivation and :doc:`fcn_2D_segm` for segmentation
9-
standard network.
9+
network.
1010

1111
Summary
1212
+++++++
1313

1414
This tutorial provides a brief explanation of the U-Net architecture as well as a way to implement
15-
it using Theano and Lasagne. U-Net is a fully convolution network (FCN) that does image segmentation.
15+
it using Theano and Lasagne. U-Net is a Fully Convolutional Network (FCN) that does image segmentation.
1616
Its goal is then to predict each pixel's class.
17-
Compared to image classification, the difficulty arise from the fact that localisation is important.
17+
Compared to image classification, the difficulty arises from the fact that localisation is important.
1818
The network must capture the overall context and recognize very precise details.
1919

2020

2121
Model
2222
+++++
2323

2424
The U-Net architecture is built upon the Fully Convolutional Network and modified
25-
in a way that it yields better segmentation.
26-
Compared to FCN-8, the main difference is the added skip connections between
27-
the contracting path and the expansive path.
28-
These skip connections intend to provide local information
25+
in a way that it yields better segmentation in medical imaging.
26+
Compared to FCN-8, the two main differences are (1) U-net is symmetric and (2) the skip
27+
connections between the downsampling path and the upsampling path apply a concatenation
28+
operator instead of a sum. These skip connections intend to provide local information
2929
to the global information while upsampling.
30-
Also, the large number of feature maps in the upsampling path allows the network to
31-
transfer information. By comparison, the basic FCN architecture only had
32-
*number of classes* feature maps in its upsampling path.
30+
Because of its symmetry, the network has a large number of feature maps in the upsampling
31+
path, which allows to transfer information. By comparison, the basic FCN architecture only had
32+
*number of classes* feature maps in its upsampling path.
3333

34-
The U-Net owes its name to its symmetric shape, which is different from standard
35-
FCN architectures.
34+
The U-Net owes its name to its symmetric shape, which is different from other FCN variants.
3635

37-
U-Net architecture is separated is 2 parts:
36+
U-Net architecture is separated in 3 parts:
3837

3938
- 1 : The contracting/downsampling path
40-
- 2 : The expansive/upsampling path
39+
- 2: Bottleneck
40+
- 2 : The expanding/upsampling path
4141

4242
.. figure:: images/unet.jpg
4343
:align: center
@@ -49,48 +49,48 @@ U-Net architecture is separated is 2 parts:
4949
Contracting/downsampling path
5050
=============================
5151

52-
The contracting path is composed of 4 blocks. Each block is composed of
52+
The contracting path is composed of 4 blocks. Each block is composed of
5353

5454
* 3x3 Convolution Layer + activation function
5555
* 3x3 Convolution Layer + activation function
5656
* 2x2 Max Pooling
5757

58-
Note that the number of feature maps double at each pooling, starting with
59-
64 feature maps for the first block, 128 for the second, and so on.
60-
The purpose of this contracting path is to capture the context of the input image
58+
Note that the number of feature maps doubles at each pooling, starting with
59+
64 feature maps for the first block, 128 for the second, and so on.
60+
The purpose of this contracting path is to capture the context of the input image
6161
in order to be able to do segmentation. This coarse contextual information will
62-
then be transfered to the upsampling path with the skip connections.
62+
then be transfered to the upsampling path by means of skip connections.
6363

6464

65-
Bottleneck path
66-
===============
65+
Bottleneck
66+
==========
6767

68-
This part of the network is between contracting and downsampling path.
69-
The bottleneck path in simply 2 convolutional layers, with a dropout layer.
68+
This part of the network is between the contracting and expanding paths.
69+
The bottleneck is built from simply 2 convolutional layers, with dropout.
7070

7171

72-
Expansive/upsampling path
72+
Expanding/upsampling path
7373
=========================
7474

75-
The expansive path is also composed of 4 blocks. Each of these blocks is composed of
75+
The expanding path is also composed of 4 blocks. Each of these blocks is composed of
7676

77-
* Deconvolution layer with stride 2
77+
* Deconvolution layer with stride 2
7878
* Concatenation with the corresponding cropped feature map from the contracting path
7979
* 3x3 Convolution layer + activation function
8080
* 3x3 Convolution layer + activation function
8181

8282

83-
The purpose of this expansive path is to enable precise localization combined
83+
The purpose of this expanding path is to enable precise localization combined
8484
with contextual information from the contracting path.
8585

8686
Advantages
8787
==========
8888

8989
* The U-Net combines the location information from the downsampling path with the contextual information in the upsampling path to finally obtain a general information combining localisation and context, which is necessary to predict a good segmentation map.
9090

91-
* No dense layer, so images of different sizes can be used as input (since the only parameters to learn on convolution layers are the kernel, and the size of the kernel is independant from input image' size).
91+
* No dense layer, so images of different sizes can be used as input (since the only parameters to learn on convolution layers are the kernel, and the size of the kernel is independent from input image' size).
9292

93-
* The use of massive data augmentation is important is domains like biomedical segmentation, since there are not a lot of annotated examples.
93+
* The use of massive data augmentation is important in domains like biomedical segmentation, since the number of annotated samples is usually limited.
9494

9595

9696
Code - Citations - Contact
@@ -105,35 +105,35 @@ The U-Net implementation can be found in the following GitHub repo:
105105

106106
The user can now build a U-Net with a specified number of input channels and number of classes.
107107

108-
First include the Lasagna layer needed to define the U-Net architecture :
108+
First include the Lasagne layers needed to define the U-Net architecture :
109109

110110
.. literalinclude:: ../code/Unet_lasagne_recipes.py
111111
:start-after: start-snippet-1
112112
:end-before: end-snippet-1
113113

114-
The *net* variable will be a ordered dictionary containing the layers' name as key and the layer instance as value.
115-
This is needed to be able to concatenate the feature maps from the contracting to expansive path.
114+
The *net* variable will be an ordered dictionary containing the layers' name as key and the layer instance as value.
115+
This is needed to be able to concatenate the feature maps from the contracting to expanding path.
116116

117117

118-
First the downsampling path :
118+
First the contracting path :
119119

120120
.. literalinclude:: ../code/Unet_lasagne_recipes.py
121121
:start-after: start-snippet-downsampling
122122
:end-before: end-snippet-downsampling
123-
124-
And then the bottleneck path :
125-
123+
124+
And then the bottleneck :
125+
126126
.. literalinclude:: ../code/Unet_lasagne_recipes.py
127127
:start-after: start-snippet-bottleneck
128128
:end-before: end-snippet-bottleneck
129-
130-
And finally the upsampling path :
131-
129+
130+
Followed by the expanding path :
131+
132132
.. literalinclude:: ../code/Unet_lasagne_recipes.py
133133
:start-after: start-snippet-upsampling
134134
:end-before: end-snippet-upsampling
135135

136-
And the output path (to obtain *number of classes* feature maps):
136+
And finally the output path (to obtain *number of classes* feature maps):
137137

138138
.. literalinclude:: ../code/Unet_lasagne_recipes.py
139139
:start-after: start-snippet-output
@@ -149,10 +149,6 @@ U_Net: Convolutional Networks for Biomedical Image Segmentation
149149

150150
* `[pdf] <https://arxiv.org/pdf/1505.04597.pdf>`__ reference
151151

152-
Fully Convolutional Networks for Semantic Segmentation
153-
154-
* `[pdf] <https://people.eecs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf>`__ reference
155-
156152
Papers related to Theano:
157153

158154
* `[pdf] <http://www.iro.umontreal.ca/~lisa/pointeurs/nips2012_deep_workshop_theano_final.pdf>`__ Bastien, Frédéric, Lamblin, Pascal, Pascanu, Razvan, Bergstra, James, Goodfellow, Ian, Bergeron, Arnaud, Bouchard, Nicolas, and Bengio, Yoshua. Theano: new features and speed improvements. NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2012.

0 commit comments

Comments
0 (0)
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.