After the object localization project, which was performed with a custom network, I tried to work with a well know robust and powerfull architecture: the Mask-R-CNN.
Starting with an image of the sky with a large number of galaxies on it, I want to detect the position of the galaxies in the image and classify those galaxies in circular or elliptical ones.
Starting image
The Transfer learning with Mask-R-CNN has been used to achieve the objective.
MRCNN architecture
Due to the absence of labels on the original image, a set of fake galaxies are generate using a code which samples the original image to decide the range of colors and simulates several new images with galaxies of different shapes.
Becuase the fake galaxies are generated, they have a correct label and segmentation.
Those new images are fed to the MRCNN as training and test set.
Example of generated image
Once the MRCNN is trained is then used to find the galaxies in the real image.
The network predict correctly on both the generated samples and the real one, here belowe an example
Generated image
Real Image
The code can be found in my github repository: