Open dickkky opened 5 years ago
It might be because the dataset found 0 images. Could you elaborate a bit more?
Thanks for your reply! According to the README, I executed it strictly step by step. There was no warning and error reporting when I running test.py. When finished running, the program created the directory ./results/coco_pretrained/, but there’s nothing in it. My running environment is: centos7+Python3.6+cuda9.
在 2019年4月21日,08:11,taesungp notifications@github.com 写道:
It might be because the dataset found 0 images. Could you elaborate a bit more?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
That is strange. I just cloned the repo and followed README, and I found the images in results/coco_pretrained.
I downloaded the pretrained models, did not download coco dataset but used the sample images in ./dataset/coco_stuff
. The following was printed to my console. Could you share your console output as well?
python test.py --name coco_pretrained --dataset_mode coco --dataroot datasets/coco_stuff/
----------------- Options ---------------
aspect_ratio: 1.0
batchSize: 1
cache_filelist_read: True
cache_filelist_write: True
checkpoints_dir: ./checkpoints
coco_no_portraits: False
contain_dontcare_label: True
crop_size: 256
dataroot: datasets/coco_stuff/ [default: ./datasets/cityscapes/]
dataset_mode: coco
display_winsize: 256
gpu_ids: 0
how_many: inf
init_type: xavier
init_variance: 0.02
isTrain: False [default: None]
label_nc: 182
load_from_opt_file: False
load_size: 256
max_dataset_size: 9223372036854775807
model: pix2pix
nThreads: 0
name: coco_pretrained [default: label2coco]
nef: 16
netG: spade
ngf: 64
no_flip: True
no_instance: False
no_pairing_check: False
norm_D: spectralinstance
norm_E: spectralinstance
norm_G: spectralspadesyncbatch3x3
num_upsampling_layers: normal
output_nc: 3
phase: test
preprocess_mode: resize_and_crop
results_dir: ./results/
serial_batches: True
use_vae: False
which_epoch: latest
z_dim: 256
----------------- End -------------------
dataset [CocoDataset] of size 8 was created
Network [SPADEGenerator] was created. Total number of parameters: 97.5 million. To see the architecture, do print(network).
/mnt/ilcompfbd1/user/tapark/miniconda3/envs/python3/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:129: UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.{} is deprecated. Use nn.functional.interpolate instead.".format(self.name))
/mnt/ilcompfbd1/user/tapark/miniconda3/envs/python3/lib/python3.6/site-packages/torch/nn/functional.py:1320: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead.
warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.")
process image... datasets/coco_stuff/val_img/000000000139.jpg
process image... datasets/coco_stuff/val_img/000000000785.jpg
process image... datasets/coco_stuff/val_img/000000001268.jpg
process image... datasets/coco_stuff/val_img/000000001490.jpg
process image... datasets/coco_stuff/val_img/000000001503.jpg
process image... datasets/coco_stuff/val_img/000000001584.jpg
process image... datasets/coco_stuff/val_img/000000001818.jpg
process image... datasets/coco_stuff/val_img/000000001993.jpg
It’s my console output below: [root@localhost SPADE]# python3 test.py --name /home/zhishen/python/Model_1/SPADE/checkpoints/coco_pretrained --dataset_mode coco --dataroot /home/zhishen/python/Model_1/SPADE/datasets/coco_stuff/ --gpu_ids 0 ----------------- Options --------------- aspect_ratio: 1.0 batchSize: 1 cache_filelist_read: True cache_filelist_write: True checkpoints_dir: ./checkpoints coco_no_portraits: False contain_dontcare_label: True crop_size: 256 dataroot: /home/zhishen/python/Model_1/SPADE/datasets/coco_stuff/ [default: ./datasets/cityscapes/] dataset_mode: coco display_winsize: 256 gpu_ids: -1 [default: 0] how_many: inf init_type: xavier init_variance: 0.02 isTrain: False [default: None] label_nc: 182 load_from_opt_file: False load_size: 256 max_dataset_size: 9223372036854775807 model: pix2pix nThreads: 0 name: /home/zhishen/python/Model_1/SPADE/checkpoints/coco_pretrained [default: label2coco] nef: 16 netG: spade ngf: 64 no_flip: True no_instance: False no_pairing_check: False norm_D: spectralinstance norm_E: spectralinstance norm_G: spectralspadesyncbatch3x3 num_upsampling_layers: normal output_nc: 3 phase: test preprocess_mode: resize_and_crop results_dir: /home/zhishen/python/Model_1/SPADE/results/ serial_batches: True use_vae: False which_epoch: latest z_dim: 256 ----------------- End ------------------- dataset [CocoDataset] of size 5000 was created Network [SPADEGenerator] was created. Total number of parameters: 97.5 million. To see the architecture, do print(network). /usr/local/python3/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:129: UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.{} is deprecated. Use nn.functional.interpolate instead.".format(self.name)) /usr/local/python3/lib/python3.6/site-packages/torch/nn/functional.py:1320: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead. warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.") process image... /home/zhishen/python/Model_1/SPADE/datasets/coco_stuff/val_img/000000000139.jpg process image... /home/zhishen/python/Model_1/SPADE/datasets/coco_stuff/val_img/000000000285.jpg process image... /home/zhishen/python/Model_1/SPADE/datasets/coco_stuff/val_img/000000000632.jpg
发自我的iPhone
------------------ Original ------------------ From: taesungp notifications@github.com Date: Sun,Apr 21,2019 10:13 AM To: NVlabs/SPADE SPADE@noreply.github.com Cc: dickkky 304444290@qq.com, Author author@noreply.github.com Subject: Re: [NVlabs/SPADE] Nothing in ./results/coco_pretrained (#27)
That is strange. I just cloned the repo and followed README, and I found the images in results/coco_pretrained.
I downloaded the pretrained models, did not download coco dataset but used the sample images in ./dataset/coco_stuff. The following was printed to my console. Could you share your console output as well?
python test.py --name coco_pretrained --dataset_mode coco --dataroot datasets/coco_stuff/ ----------------- Options --------------- aspect_ratio: 1.0 batchSize: 1 cache_filelist_read: True cache_filelist_write: True checkpoints_dir: ./checkpoints coco_no_portraits: False contain_dontcare_label: True crop_size: 256 dataroot: datasets/coco_stuff/ [default: ./datasets/cityscapes/] dataset_mode: coco display_winsize: 256 gpu_ids: 0 how_many: inf init_type: xavier init_variance: 0.02 isTrain: False [default: None] label_nc: 182 load_from_opt_file: False load_size: 256 max_dataset_size: 9223372036854775807 model: pix2pix nThreads: 0 name: coco_pretrained [default: label2coco] nef: 16 netG: spade ngf: 64 no_flip: True no_instance: False no_pairing_check: False norm_D: spectralinstance norm_E: spectralinstance norm_G: spectralspadesyncbatch3x3 num_upsampling_layers: normal output_nc: 3 phase: test preprocess_mode: resize_and_crop results_dir: ./results/ serial_batches: True use_vae: False which_epoch: latest z_dim: 256 ----------------- End ------------------- dataset [CocoDataset] of size 8 was created Network [SPADEGenerator] was created. Total number of parameters: 97.5 million. To see the architecture, do print(network). /mnt/ilcompfbd1/user/tapark/miniconda3/envs/python3/lib/python3.6/site-packages/torch/nn/modules/upsampling.py:129: UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.{} is deprecated. Use nn.functional.interpolate instead.".format(self.name)) /mnt/ilcompfbd1/user/tapark/miniconda3/envs/python3/lib/python3.6/site-packages/torch/nn/functional.py:1320: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead. warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.") process image... datasets/coco_stuff/val_img/000000000139.jpg process image... datasets/coco_stuff/val_img/000000000785.jpg process image... datasets/coco_stuff/val_img/000000001268.jpg process image... datasets/coco_stuff/val_img/000000001490.jpg process image... datasets/coco_stuff/val_img/000000001503.jpg process image... datasets/coco_stuff/val_img/000000001584.jpg process image... datasets/coco_stuff/val_img/000000001818.jpg process image... datasets/coco_stuff/val_img/000000001993.jpg
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Your --name
option value is a bit weird. It's usually a name of the experiment, not the path to the checkpoint file.
Could you put the pretrained model at ./checkpoints/coco_pretrained/
, and use --name coco_pretrained
instead of the full path?
You are amazing. Yes, I solved it using your suggestion. Thanks again.
close this if your issue is resolved.
There was nothing in ./results/coco_pretrained after running test.py normally using coco dataset.