liuqk3 / PUT

Paper 'Transformer based Pluralistic Image Completion with Reduced Information Loss' in TPAMI 2024 and 'Reduce Information Loss in Transformers for Pluralistic Image Inpainting' in CVPR2022
MIT License
173 stars 15 forks source link

A confusing question about the inference #16

Open Lecxxx opened 1 year ago

Lecxxx commented 1 year ago

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?

liuqk3 commented 1 year ago

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.

Lecxxx commented 1 year ago

@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

liuqk3 commented 1 year ago

@Lecxxx ,

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

Lecxxx commented 1 year ago

@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?

liuqk3 commented 1 year ago

@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.

Hgy12345 commented 11 months ago

@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