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

image quality issue and blurryness at edges of images in semantic segmentation #105

Open
shalinikum opened this issue Jun 3, 2020 · 2 comments

Comments

@shalinikum
Copy link

image
image
I could not generate the images shown by author in example. I tried different style weight and configurations.But it is still little blurry at edge and lack crispness.

@frostbitten
Copy link

What's the full command you're running?

I managed to get the styles to be applied to their respective sections using:

python neural_style.py --content_img 02390.jpg \
                       --content_img_dir ./examples/segmentation \
                       --style_imgs_dir ./examples/segmentation \
                       --style_imgs basquiat.png frida.png \
                       --style_mask \
                       --style_mask_imgs 02390_mask.png 02390_mask_inv.png \
                       --style_imgs_weights 1.0 1.0\
                       --max_size 800 \
                       --max_iterations 600 \
                       --device /gpu:0 \
                       --optimizer adam \
                       --verbose;

with this output:
result-issue105-adam

But this too doesn't quite match the example.

After playing with the parameters (default optimizer, larger style_weight):

python neural_style.py --content_img 02390.jpg \
                       --content_img_dir ./examples/segmentation \
                       --style_imgs_dir ./examples/segmentation \
                       --style_imgs basquiat.png frida.png \
                       --style_mask \
                       --style_mask_imgs 02390_mask.png 02390_mask_inv.png \
                       --style_imgs_weights 1.0 1.0\
                       --max_size 800 \
                       --max_iterations 500 \
                       --device /gpu:0 \
                       --style_weight 1e7 \
                       --verbose;

I can get as close as this:

result-issue105-b

@cysmith
Copy link
Owner

cysmith commented Jun 8, 2020

I did this project a few years ago so I don't remember. I would try higher style weight and more iterations.

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