Without much ado, let’s get started with the code. The complete project on github can be found here.
Let’s start with loading all the libraries and dependencies.
We should also set some of the parameter values and load the training and test set images.
Next we should prepare the data in the form we want. To reduce the computational complexity we need to resize all the images.
The next step is probably the most important part of the project yet neglected most of the times. Yes, that is data augmentation. I have used shearing of images to overcome overfitting. Since the dataset size is small in this case, overfitting is not a major problem here.
Let’s display some microscopic images with and without segmentation.
Let’s also create a generator that generates masks and images.
Credit: BecomingHuman By: Abhinav Sagar