Get instance info from the segmentation masks
anmolkalia opened this issue · comments
anmolkalia commented
I noticed that the way to get the class mask is:
ObjectClassMasks = (R/10).astype(np.int32)*256+(G.astype(np.int32))
Is there a similar way to get the instance information or instance mask from the RGB channels for both object level and part level segmentations?
Thanks!
Xavier Puig commented
Hi, I just updated utils_ade20k.py
to obtain the instance mask from the RGB channels. You can find the code here:
https://github.com/CSAILVision/ADE20K/blob/main/utils/utils_ade20k.py#L30