Dataset for Mask2former

Hi,
I want to make a custom dataset for Mask2former model. Could you please let me know how can I proceed while I have more than 256 labels in my dataset?

I’ve managed to make it work that way myself:

/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fencoding-masks-for-mask2former-and-panopic-segmentation%2F110245%3Fu%3Dnlassaux%3C%2Fa%3E%3C%2Fp%3E