otepencelik / GAN-Artwork-Generation

25 stars 7 forks source link

Where are the real style labels loaded from? #2

Open sendeniz opened 3 years ago

sendeniz commented 3 years ago

Dear otepencelik,

Thank you for sharing your work, its very interesting! I was curious about the cgan implementation. I have studied your code base and repo. In the cGAN, however I cannot find the corresponding line where you condition art generation on the art style labels. Where are art style labels loaded and passed to the model ? The dataloader.py loads images. It does not load labels. Then the cgan_model uses n_classes, which are the number of classes that exist in the data-set. During training you pass:

real_style_labels = real_style_labels.to(device)

where are they from ? Could you elaborate on this ? I really need to know.

otepencelik commented 3 years ago

The labels are loaded by ImageFolder in dataloader.py:

dataset = torchvision.datasets.ImageFolder(root=dataroot,transform=transform)

The ImageFolder Class can assign classification labels from folder names. Please check out the documentation