Binary semantic segmentation using U-Net in TensorFlow 2 / Keras.
All the code files and folders follow the following structure in ipynb file.
├── training.tif
├── testing.tif
├── training_groundtruth.tif
├── testing_groundtruth.tif
├── patches
│ ├── images
│ └── masks
└── model.hdf5
The line of research is motivated by the need to accurately segment mitochondria from images. To solve this problem, we will use binary semantic segmentation using U-Net in TensorFlow 2 / Keras.
It is used U-Net model, which is trained on this Electron Microscopy Dataset. Mitochondria is annotated in two sub-volumes. Each sub-volume consists of 165 slices of 1024x768.
U-Net is a semantic segmentation technique originally proposed for medical imaging segmentation. U-Net was introduced in the paper, U-Net: Convolutional Networks for Biomedical Image Segmentation. The model architecture is fairly simple: an encoder (for downsampling) and a decoder (for upsampling) with skip connections.
The gray arrows indicate the skip connections that concatenate the encoder feature map with the decoder, which helps the backward flow of gradients for improved training.
Please, follow the instruction in the provided notebook.
With just 1000 images of 256x256 and 25 epochs of training, it achieves a Mean Intersection over Union (IoU) of 0.96 in the unseen test partition.