Skip to content
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

How to avoid blocky reconstruction #36

Open
harshithabk opened this issue Feb 16, 2018 · 4 comments
Open

How to avoid blocky reconstruction #36

harshithabk opened this issue Feb 16, 2018 · 4 comments

Comments

@harshithabk
Copy link

@pathak22

How to remove the blocking artifact in the patch loction after reconstruction of image?
What value to be set in this part of code?

image_ctx[{{},{1},{1 + opt.fineSize/4 + opt.overlapPred, opt.fineSize/2 + opt.fineSize/4 - opt.overlapPred},{1 + opt.fineSize/4 + opt.overlapPred, opt.fineSize/2 + opt.fineSize/4 - opt.overlapPred}}] = 2117.0/255.0 - 1.0
image_ctx[{{},{2},{1 + opt.fineSize/4 + opt.overlapPred, opt.fineSize/2 + opt.fineSize/4 - opt.overlapPred},{1 + opt.fineSize/4 + opt.overlapPred, opt.fineSize/2 + opt.fineSize/4 - opt.overlapPred}}] = 2
104.0/255.0 - 1.0
image_ctx[{{},{3},{1 + opt.fineSize/4 + opt.overlapPred, opt.fineSize/2 + opt.fineSize/4 - opt.overlapPred},{1 + opt.fineSize/4 + opt.overlapPred, opt.fineSize/2 + opt.fineSize/4 - opt.overlapPred}}] = 2*123.0/255.0 - 1.0

The above values are used to set mean value in R. G. B.
But we want to make this region fully transparent [no blocky artifact].

Can you please guide us on this regard

@pathak22
Copy link
Owner

What is a blocking artifact? Can you post some images?

@harshithabk
Copy link
Author

@pathak22
Blocky artifact means
test_imgnet_14

How do we remove those artifacts?

@pathak22
Copy link
Owner

Surprising! Is it the from the trained model I released? This very result looks much better when I tried. For instance see this figure here: https://people.eecs.berkeley.edu/~pathak/context_encoder/resources/result_fig.jpg

Could you give more details? thanks!

@russab0
Copy link

russab0 commented Dec 20, 2020

@harshithabk any details?
I have faced the same problem when trying to run the model on a different dataset. The reconstructed area is simply 16 blocks (attached the example)

0025500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants