CSAILVision / ADE20K

ADE20K Dataset
325 stars 56 forks source link

Get instance info from the segmentation masks #13

Closed anmolkalia closed 3 years ago

anmolkalia commented 3 years ago

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!

xavierpuigf commented 3 years ago

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