Pallawi
1 min readJan 10, 2020

--

Hi Ibrahim,

Thank you for writing.

The problem statement that I am trying to solve in this blog is to segment building footprints. I have two class in my problem statement the buildings and anything other than that is the background. The nature of my segmentation is binary. Therefore my dataset has training images which are colour/rgb/3 channel and their corresponding mask is binary. The mask has only two intensity values 0 and 255. Any pixel on the mask which is 0 belongs to background and pixels with intensity 255 belongs to the building footprints.

If you wish to have the number of classes greater than 2 for example — building, cars, road printed signs. Then your mask will no longer remain a binary in nature. It will have multiple intensities. It will become an indexed image.

For example:

Building -[1,1,1]

Cars — [2,2,2]

Road painted signs — [3,3,3]

In the mask image if a pixel has [1,1,1] in all the three-channel respectively R=1, G=1, B=1, then that pixel belongs to the building.

and same applies for the other pixel and classes.

If you increase the number of classes than two, you need to have more intensity values, than just 0 and 255. The training image corresponding to each mask will remain the same (colour/3 channel images).

--

--

Pallawi
Pallawi

Written by Pallawi

Computer Vision contributor. Lead Data Scientist @https://www.here.com/ Love Data Science.

No responses yet