-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About inference #12
Comments
Hi @dongdongdong233 , Thanks for your interests. Sorry for this mistake. The |
Hi, thanks so much for your replying! |
您好,最近读了您的论文Reduce Information Loss in Transformers for Pluralistic Image Inpainting,对您的论文十分有兴趣,在网上下载了您发布的代码。训练过程十分顺利,在推理单个修复结果(即运行python scripts/inference.py --name OUTPUT/transformer_naturalscene/checkpoint/last.pth --func inference_complet_sample_in_feature_for_evaluation --gpu 0 --batch_size 1 此行代码时),系统报了许多错,例如:AttributeError: 'PatchVQGAN' object has no attribute 'emb_proj'等
根据debug的过程来看,发现系统在调用patch_vqgan.py文件中的PatchVQGAN类时,用到了很多masked_image_inpainting_transformer_in_feature.py文件中写到的属性和方法,而PatchVQGAN类中并未定义这些方法和属性,那么程序可不可以直接调用masked_image_inpainting_transformer_in_feature.py文件里的方法呢。
由于程序的代码量对我来说很大,我做了许多尝试后发现自己并不能在短时间内读懂代码并解决这个问题,故而冒昧向您求助,热切盼望您能在百忙之中抽空回复我的邮件,解答疑惑。
祝您科研顺利,生活愉快!
…------------------ 原始邮件 ------------------
发件人: "liuqk3/PUT" ***@***.***>;
发送时间: 2022年10月11日(星期二) 下午4:55
***@***.***>;
***@***.******@***.***>;
主题: Re: [liuqk3/PUT] About inference (Issue #12)
Hi @dongdongdong233 ,
Thanks for your interests.
Sorry for this mistake. The relative_path is just used to save the completed results. You can simply modify the config file like the following example:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi @dongdongdong233 , P-VQVAE is just and auto-encoder, which can not inpaint the images but only reconstruct the images. If you want to inpaint an image, you need to train a UQ-Trainsformer further (or use our pretrained models). After that, you can use the command |
From the logs you provided, it seems that the images are not located correctly, which means 0 images need to be inpainted. You can have a debug about the class Thanks. |
Thanks for your prompt reply,I‘ll try it. |
你好,在测试的过程中,我发现测试的mask似乎并不是我指定的mask,我想问一下应该如何设定呢,而且测试的mask覆盖率普遍在百分之30之上? |
You can have a look at this 12 #issue comment. Or you can modify 'inference.py' to load masks from another directory. |
@liuqk3 Traceback (most recent call last): Could you please help me to solve this problem? |
I also encountered this problem. |
@Lecxxx , I think the error is thrown by the reconstruction function. Currently, the pretrained P-VQVAE is not seperately provided. You can try the inpainting function. |
Hi,
Thanks for the excellent code, when I inference the pictures, My program output is:
KeyError: 'relative_path'
Then I found "relative_path" is a key of "data_i", but when I print data_i, I found there doesn't have the key named "relative_path" in the "data_i". So what is "relative_path"?
Please reply!
The text was updated successfully, but these errors were encountered: