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

About the pretained model of ImageNet from BaiduYunpan #8

Closed Haoru closed 1 year ago

Haoru commented 1 year ago

The pretrained model of ImageNet from BaiduYunpan is missing. Could you please provide it again? And it is difficult for me to download the pretrained model of ImageNet from OneDrive completely.

liuqk3 commented 1 year ago

Hi @Haoru ,

The pretrained models have been re-uploaded to BaiduYunPan. You can download them now.

Haoru commented 1 year ago

Thank you very much! And how to set parameters for the evaluation of image inpainting methods that only produce one deterministic result for the given input?

liuqk3 commented 1 year ago

To get the deterministic result for the given input, you can just set the topk=1 (filter_ratio=[1] in the script).

https://github.com/liuqk3/PUT/blob/7de8ce0ada1e63e8c5300857a463d68380e142f0/scripts/inference.py#L327 https://github.com/liuqk3/PUT/blob/7de8ce0ada1e63e8c5300857a463d68380e142f0/scripts/inference.py#L545

The number of tokens in each iteration can be set to 1 (predicts tokens one-by-one) or -1 (predicts all tokens in one iteration).

https://github.com/liuqk3/PUT/blob/7de8ce0ada1e63e8c5300857a463d68380e142f0/scripts/inference.py#L554

Haoru commented 1 year ago

Thanks!