boschresearch / ALDM

Official implementation of "Adversarial Supervision Makes Layout-to-Image Diffusion Models Thrive" (ICLR 2024)
https://yumengli007.github.io/ALDM/
GNU Affero General Public License v3.0
51 stars 3 forks source link

Manual definition of classes for new dataset #12

Closed MalekSamet closed 1 month ago

MalekSamet commented 3 months ago

For definition of classes for a new dataset, do I need a dataset_info.json file as for cityscapes? Should the new dataloader has the structure of cityscapes.py or ade20k.py? Note that my new dataset has some classes from ade20 and some new classes.

Can you also explain, why in the function conver_labels in the ade20k.py file, we subsstract q from the label: label = label -1 Why don't we keep the ids as they are?

YumengLi007 commented 3 months ago

Yes, you would need a similar structure of cityscapes.py or ade20k.py conver_labels are not necessary, it's just for mapping original ADE20K labels to the actual trained IDs. The important thing is to have a consistent and unified defination of class names and class ids for both generator and discriminator. You could either define them in a json like Cityscapes, or just use a dict. btw, I have updated README here recently, hopefully it also helps a bit :)