junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
23.1k stars 6.32k forks source link

combine A and B in pix2pix #1298

Closed JiangPeiy closed 3 years ago

JiangPeiy commented 3 years ago

hi I met a problem (base) G:\pythonProject1\tl\tensorlayer\pytorch-CycleGAN-and-pix2pix>python datasets/combine_A_and_B.py --fold_A ./datasets/data/mars/A/train --fold_B ./datasets/data/mars/B/train --fold_AB ./dat asets/data/mars/train [fold_A] = ./datasets/data/mars/A/train [fold_B] = ./datasets/data/mars/B/train [fold_AB] = ./datasets/data/mars/train [num_imgs] = 999 [use_AB] = False [no_multiprocessing] = False Traceback (most recent call last): File "datasets/combine_A_and_B.py", line 35, in img_list = os.listdir(img_fold_A) NotADirectoryError: [WinError 267] 目录名称无效。: './datasets/data/mars/A/train\100_A.jpg'

Use python datasets/combine_A_and_B.py --fold_A ./datasets/data/mars/A/train --fold_B ./datasets/data/mars/B/train --fold_AB ./datasets/data/mars/train

my data is stored in A/train and B/train with 1000 jpg.

I follow the instructions carefully but there still exists problems.

aik-lw commented 3 years ago

First thing to try is make your slash consistent. See the error - './datasets/data/mars/A/train\100_A.jpg'

junyanz commented 3 years ago

yeah, make sure your path is consistent. We also haven't tested the code on Windows. It should work for Linux and MAC.