jhoffman / cycada_release

Code to accompany ICML 2018 paper
BSD 2-Clause "Simplified" License
561 stars 126 forks source link

Reproducing SVHN2MNIST #5

Closed junhocho closed 6 years ago

junhocho commented 6 years ago

When Train feature adaptation following image adaptation, how to set dataset structure? Where do we put [label]_[imageId]_fake_B.png images ?

It seems given instruction is not enough to reproduce. Changed src=svhn2mnist in train_adda.py, I put all the images in svhn2mnist which I mkdir in the dataroot folder. Doesn't work in that way.

The function get_dataset in data_loader.py returns None and causes

Traceback (most recent call last):
  File "scripts/train_adda.py", line 63, in <module>
    lr=src_lr, betas=betas, weight_decay=weight_decay)
  File "/home/junho/uda/cycada/cycada/tools/train_task_net.py", line 96, in train
    for epoch in range(num_epoch):
  File "/home/junho/uda/cycada/cycada/tools/train_task_net.py", line 25, in train_epoch
    for batch_idx, (data, target) in enumerate(loader):
TypeError: 'NoneType' object is not iterable

Plus, it would be nice to release your synthesized SVHN2MNIST images in zip or tar file. I didn't know how to download your images in webfolder and crawled whith index.html file.

slowbull commented 6 years ago

Changing https://github.com/jhoffman/cycada_release/blob/b553285122b32377fe995052350eeb68c46dfcb7/cycada/data/cyclegan.py#L25 to image_paths.append(basename) solves my problem.

jhoffman commented 6 years ago

The images should be in a folder with the dataset name which will be stored under the "datadir" you specify -- so for example download images and store in folder "datadir/svhn2mnist". I have updated the images to be zip files for easier download.