PUT icon indicating copy to clipboard operation
PUT copied to clipboard

A confusing question about the inference

Open Lecxxx opened this issue 2 years ago • 6 comments

Hi, Thanks for your contribution,but I'm confused about the inference. I must run the Pvqvae inference first,

python scripts/inference.py --name OUTPUT/pvqvae_exp_name/checkpoint/last.pth --func inference_reconstruction --gpu 0 --batch_size 8

then run the transformer inference second

python scripts/inference.py --name OUTPUT/transformer_exp_name/checkpoint/last.pth --func inference_complet_sample_in_feature_for_evaluation --gpu 0 --batch_size 1

Is it right?

Lecxxx avatar Nov 25 '22 08:11 Lecxxx

No. Just

python scripts/inference.py --name OUTPUT/transformer_exp_name/checkpoint/last.pth --func inference_complet_sample_in_feature_for_evaluation --gpu 0 --batch_size 1

is enough.

liuqk3 avatar Nov 27 '22 14:11 liuqk3

@liuqk3 Thanks for the reply. But after I run python scripts/inference.py --name OUTPUT/transformer_naturalscene/checkpoint/000199e_495399iter.pth --func inference_complet_sample_in_feature_for_evaluation --gpu 1 --batch_size 1 the completed rusult is terrible. Places365_val_00033355 Places365_val_00030843

Lecxxx avatar Nov 27 '22 14:11 Lecxxx

@Lecxxx ,

It seems that the model is not load correctly. You can have a look at this.

liuqk3 avatar Nov 28 '22 01:11 liuqk3

@liuqk3 Thanks for the reply. In the prepare_data.md,I found that you only used some pictures of val in Places2,Could you tell me if the Inference part only uses 800 photos in places2?

Lecxxx avatar Dec 14 '22 04:12 Lecxxx

@Lecxxx , Yes. We follow ICT, the testing images on FFHQ, Places2 and ImageNet are exactly the same with ICT. Only 800 images are used for inference to get the metrics.

liuqk3 avatar Dec 14 '22 07:12 liuqk3

@liuqk3 Thanks for the reply. But after I run the completed rusult is terrible.python scripts/inference.py --name OUTPUT/transformer_naturalscene/checkpoint/000199e_495399iter.pth --func inference_complet_sample_in_feature_for_evaluation --gpu 1 --batch_size 1 Places365_val_00033355 Places365_val_00030843

Have you solved the problem? I had a similar situation image

Hgy12345 avatar Sep 24 '23 11:09 Hgy12345