Seanseattle/SMIS

Error while testing

Closed this issue · 5 comments

Hello thanks for publishing this project.
When I try to test:
python3 test.py --name deepfashion_smis --dataset_mode deepfashion --dataroot /root/filters/SMIS/data/deepfashion --no_instance --gpu_ids 1 --ngf 160 --batchSize 4 --model smis --netG deepfashion

After placing the trained model in /checkpoints
I get the following error:

Traceback (most recent call last):
File "test.py", line 19, in
dataloader = data.create_dataloader(opt)
File "/root/filters/SMIS/data/init.py", line 44, in create_dataloader
instance.initialize(opt)
File "/root/filters/SMIS/data/pix2pix_dataset.py", line 22, in initialize
label_paths, image_paths, instance_paths = self.get_paths(opt)
File "/root/filters/SMIS/data/deepfashion_dataset.py", line 30, in get_paths
label_paths_all = make_dataset(label_dir, recursive=False)
File "/root/filters/SMIS/data/image_folder.py", line 49, in make_dataset
assert os.path.isdir(dir) or os.path.islink(dir), '%s is not a valid directory' % dir
AssertionError: /root/filters/SMIS/data/deepfashion/cihp_test_mask is not a valid directory

What am I doing wrong?

There is a mistake with your 'error'. By the way, the trained model should be in the 'checkpoints/' folder.

Thanks i've updated the issue and error accordingly, and path to checkpoint is

checkpoints/latest_net_G.pth (referring to fashion model)

When I try to test:
python3 test.py --name deepfashion_smis --dataset_mode deepfashion --dataroot /root/filters/SMIS/data/deepfashion --no_instance --gpu_ids 1 --ngf 160 --batchSize 4 --model smis --netG deepfashion

After placing the trained model in /checkpoints
I get the following error:

Traceback (most recent call last):
File "test.py", line 19, in
dataloader = data.create_dataloader(opt)
File "/root/filters/SMIS/data/init.py", line 44, in create_dataloader
instance.initialize(opt)
File "/root/filters/SMIS/data/pix2pix_dataset.py", line 22, in initialize
label_paths, image_paths, instance_paths = self.get_paths(opt)
File "/root/filters/SMIS/data/deepfashion_dataset.py", line 30, in get_paths
label_paths_all = make_dataset(label_dir, recursive=False)
File "/root/filters/SMIS/data/image_folder.py", line 49, in make_dataset
assert os.path.isdir(dir) or os.path.islink(dir), '%s is not a valid directory' % dir
AssertionError: /root/filters/SMIS/data/deepfashion/cihp_test_mask is not a valid directory

What am I doing wrong?

Have you downloaded the DeepFashion dataset and placed it in the 'data' folder?

Thanks!