awentzonline / image-analogies

Generate image analogies using neural matching and blending.
MIT License
3.52k stars 282 forks source link

not working as well as it did a few days ago? #9

Closed memo closed 8 years ago

memo commented 8 years ago

Hey, great wrk on this. looks great. However the changes you've made in the past few days have changed the output quite a lot. A few days ago (commit: https://github.com/awentzonline/image-analogies/commit/c6f35e73bfb35035e195dd5a3bb5a018588bec3e ) I would get this (which looks perfect): pf0000_at_iteration_2_4_old

but now I get this (with the same settings): pf0000_at_iteration_2_4_new

my mask is this: pf-nm_0000

(also new version is exactly 2x faster, which is great. but I'm not anywhere near the same results)

awentzonline commented 8 years ago

Two things have changed that might affect that:

Great work on this: https://twitter.com/memotv/status/706817101386936320

awentzonline commented 8 years ago

Another option I recently added that you might want to check out is --pool-mode. It's set to max pooling by default but average pooling sometimes looks nicer --pool-mode=avg for natural images.

memo commented 8 years ago

ok, interestingly I need to make analogy weight about 20 to get results similar to the version from 2 days ago (even 16 doesn't cut it). Is it possible that there is a factor of 2x introduced somewhere since that commit? contrast and avg pooling did affect the image a little bit, but doesn't really affect the sexy sax man.

analogy weight: 16 (see little hole in his belly) pf0000_at_iteration_2_4 --contrast 0 --pool-mode avg --analogy-w 16 576s

analogy weight: 20 pf0000_at_iteration_2_4 --contrast 0 --pool-mode avg --analogy-w 20 576s

awentzonline commented 8 years ago

Would you send me your source images so I can fool around with them? Also, what do your settings look like?

memo commented 8 years ago

I've tried contrast=0, --pool-mode=avg, --analogy-w=9, 16, 20 (which are the images above), rest is default. I'm happy with the results I got in the above post with analogy-weight=20, i was just curious why I had to use 20 with this version to get similar results as 9 before.

original and mask below. dim 256x163, i'm now trying at 1024x654 (taking a while!) pf-m pf-o

awentzonline commented 8 years ago

Thanks! I'm guessing there's something I'm not normalizing properly, since I usually generate larger images, around 2x as big, and use 1/2 the analogy loss for similar effects.

awentzonline commented 8 years ago

Ok I've tracked down a few bugs and this should all be a little nicer. Now the mrf/analogy-w both start at 1.0. For your sexy sax man I found that lowering mrf to 0.5 reproduced him without the hole. Also, given the size, it looks good with --mrf-w=0 which also allows it to render faster. The gains aren't as evident at this size with one image, but if you're doing a bunch of frames then maybe it adds up.

sexysax_at_iteration_2_4

memo commented 8 years ago

cool thx, just had a quick look, seems about right.

neelkadia-zz commented 7 years ago

This is a great tool Indeed! buy Guys, Why I'm having result like this!

I'm running this by contrast=0 --pool-mode=avg, --analogy-w=9 --patch-size=3

arch_at_iteration_2_4