Segmenting images with CNN
A typical semantic segmentation task receives as input an RGB image and needs to output an image with the raw segmentation, but this solution could be problematic. We already know that classifiers generate their results using one-hot encoded labels, and we can do the same for semantic segmentation: instead of generating a single image with the raw segmentation, the network can create a series of one-hot encoded images. In our case, as we need 13 classes, the network will output 13 RGB images, one per label, with the following features:
- One image describes only one label.
- The pixels belonging to the label have a value of 1 in the red channel, while all the other pixels are marked as 0.
Each given pixel can be 1
only in one image; it will be 0
in all the remaining images. This is a difficult task, but it does not necessarily require particular architectures: a series of convolutional layers with same padding can do it; however, their cost...