# Mixed-Sized Biomedical Image Segmentation Based on U-Net Architectures
## 3 Dataset, Model and Parameters Configuration
### Model Architecture  
Our proposal makes use of the U-Net, a new CNN presented in the pioneering paper [4] to solve the problem of automatic semantic segmentation of biomedical images. U-Net is a CNN whose architecture was adapted in order to make use of a reduced image dataset while continuing to produce fairly precise segmentation. Figure 1 shows the structure of the U-Net used in this work, together with the relevant parameters. The architecture is divided into two _paths_. The path on the left is called _\"Contraction Path\"_ or _\"Encoder Path\"_, while the one on the right is referred to as _\"Expansion Path\"_, or _\"Decoder Path\"_. In the middle data, concatenations are performed, indicated by the grey arrows in Figure 1. They implement acquisition of localized information from the feature maps.  
The _Contraction Path_ consists of a certain number of contraction blocks followed by a max 2 \(\times\) 2 pooling. Each contraction block downsamples the input image, received from the previous level, in a feature map, applying two levels of 3 \(\times\) 3 convolution. The number of kernels, or feature maps, after each block doubles, so that the architecture can effectively learn the complex structure of the input image. In this case, the input image is 128 \(\times\) 128 pixels and 32 features are used in the first step. Parameters, such as the size of the input image and the number of features, can be changed according to the architecture to implement, as some criteria may not make the network work properly. Moving further and further down, the bottom level averages between the two paths and uses two CNN 3 \(\times\) 3 levels followed by a level called _\"up convolution\"_ 2 \(\times\) 2.  
Subsequently, the _Expansion Path_ section, which also consists of a series of expansion blocks, allows the network to propagate information from the lowest resolution level to higher ones. This way, it amplifies (upsamples) the final image feature map. Each block passes the received input to two 3 \(\times\) 3 convolutional levels and a 2 \(\times\) 2 upsampling level. Symmetrically to the left branch, after each block the number of feature maps used by the convolutional layer is halved. However, as shown by the gray arrows, each time the copied feature map of the corresponding contraction level is added to the input. This ensures that the features and information learned while shrinking the image are subsequently used to reconstruct it correctly. Clearly, the initial levels of the encoder contain more information, so they guarantee a significant boost in the up-sampling process, allowing the recovery of details and significantly improving the result. The architecture, being symmetrical, is such that the number of expansion blocks is equal to the number of contraction blocks. Going up to the final level of the expansion path, the resulting map passes through the final level of 3 \(\times\) 3 convolution, with the number of feature maps equal to the number of desired segments. Hence, the same feature map used for the contraction is then used to expand the vector and obtain the output image, which represents the segmentation of the input image.