#Set the pixel value for those found indices(here we are performing this across B ) to 0
#The same step is done twice for R and G respectively
for i in range(len(indice_b)):
for j in range(len(indice_b)):
Unfortunately this approach didn’t work as it only made a small section on the top left white
So i was wondering is this really the right approach and how can I generalize this to handle any class rather than sky.For example what if we want to set the pixels belonging to the person to white.
Note in all images the sky class has been color coded as [6,230,230 This is the standard choice of the semantic pallete chosen in the ADE dataset.
Another approach is to use bitwise_and to select the blue regions in the semantic map and then subtract that from the original image.However that requires a lower and upper range which may differ from image to image.