mingyuliutw / UNIT

Unsupervised Image-to-Image Translation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Images saved

mhusseinsh opened this issue · comments

Hello,

I notice that the images which are saved during the training process, or even after x iterations, it is always the same image, it doesn't change, and actually, it is the first image found in the directory, either trainA or trainB

Does this mean that the model only loads one image and train on ? or it loads all images, but saves only one image (same for every iteration, but the 4 columns are same image but flipped)

The model loads all the images found in the trainA and trainB folders for training. The reason that it keep showing the same images are because we fix the display images to be the first $(display_size) images as in train.py.

train_display_images_a = torch.stack([train_loader_a.dataset[i] for i in range(display_size)]).cuda()
train_display_images_b = torch.stack([train_loader_b.dataset[i] for i in range(display_size)]).cuda()
test_display_images_a = torch.stack([test_loader_a.dataset[i] for i in range(display_size)]).cuda()
test_display_images_b = torch.stack([test_loader_b.dataset[i] for i in range(display_size)]).cuda()

To see different images, you can change the default setting in get_all_data_loaders.py in utils.py. Basically, the train argument to get_data_loader_list function should be set True.

@mingyuliutw Thanks for the reply
I have another question please
My dataset are images with 400x300 resolution, can I run the model on rectangle images ? and if yes, what shall I edit in the configs file ?

It should work. In the worst case, you might need to change the data loader. Change how images are cropped.