CSAILVision / ADE20K

ADE20K Dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get instance info from the segmentation masks

anmolkalia opened this issue · comments

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!

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