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

Right & Bottom Border Glitches #18

Open
alexjc opened this issue Sep 14, 2015 · 4 comments
Open

Right & Bottom Border Glitches #18

alexjc opened this issue Sep 14, 2015 · 4 comments

Comments

@alexjc
Copy link

alexjc commented Sep 14, 2015

This library is pretty awesome! Not using l-bfgs means it's easier to scale up, but it helps to start from random images to find good solutions.

As such, I've been focusing on generating images from purely random seed images. In the process, I've noticed the bottom and right borders seem to have visual glitches where the top and left are fine:
http://i.imgur.com/6WQ3NVC.png

I tried looking into the way convolution is setup, but it's in same border_mode as I'd expect and that seems reasonable. I'm wonder how the pixels beyond the image or convolution area are handled. Is this mirroring or something else? Could anything else be causing issues only on two sides?

Thanks!

EDIT: Most other images I have have the same or worse artifacts along the sides, which increase over time but can be reduced by clipping. The image URL here is the highest resolution one I have at hand.

@andersbll
Copy link
Owner

Good to hear! I think the noise level is an interesting knob to turn during experiments. :)

I believe the border artifacts occur when the image dimensions are not a multiple of 32. This is due to the 5 pooling layers with a downsampling of 2 (2^5 = 32). You can try out different border modes and see if it helps.

@alexjc
Copy link
Author

alexjc commented Sep 16, 2015

Yep, aligning to 32 pixel boundaries before calling the script fixes those glitches. Thanks!

@filmo
Copy link

filmo commented Mar 1, 2016

Is it important to conform both the source and target images to the multiple of 32 or just the target?

@andersbll
Copy link
Owner

Your target and source image should have the same dimensions, right? These dimensions should be a multiple of 32 to minimize border artefacts. I don't think you need to ensure this for the style image.

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