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

Has anyone been able to match Ostagram results? #240

Open
StryxZilla opened this issue Jun 4, 2016 · 14 comments
Open

Has anyone been able to match Ostagram results? #240

StryxZilla opened this issue Jun 4, 2016 · 14 comments

Comments

@StryxZilla
Copy link

I am curious if anyone has been able to match these results. I can't seem to get close. If you have, what sort of settings are you running?

@3DTOPO
Copy link

3DTOPO commented Jun 4, 2016

Did you try, Ostagram?

https://github.com/SergeyMorugin/ostagram

@htoyryla
Copy link

htoyryla commented Jun 5, 2016

As far as I can see, https://github.com/SergeyMorugin/ostagram is only a web front-end and uses neural-style for the actual style transfer. This, of course, does not exclude the possibility that the actualOstagram service is using a modified version of neural-style.

@StryxZilla
Copy link
Author

Yeah. Their results come out quite a bit better than mine, so I am trying to determine which settings they are using (I have grabbed some high resolution input images from their site and I am messing around with the settings to get closer).

@Inkognitovsky
Copy link

StryxZilla, do you have any results ? what settings ostagram uses.

@minxdragon
Copy link

Fwiw I found putting in -init image as suggested in the ostagram forums really helped improve the quality. And suddenly more iterations seem to be making a difference too.

@Inkognitovsky
Copy link

Inkognitovsky commented Jun 12, 2016

yes, i found it too yesterday. i get very close result with these options: -content_weight 100 -style_weight 1500 -init image -normalize_gradients.
Normalize_gradients gives good results but if you use it you should change content_weight and style_weight. Now i am playing with these numbers. also i found here "#237" that the weight of every style can be changed, and i think if we can increase the weight of style "relu4_1" the result wil be very good

@StryxZilla
Copy link
Author

StryxZilla commented Jun 12, 2016

@minxdragon yeah, my results with random init haven't been good. @Inkognitovsky, I will give those settings a shot. Let me know if you get that fork to give better results through layer weighting modification.

@rayset
Copy link

rayset commented Jun 17, 2016

what's this ostagram forum? I'm messing with the normalized gradients but I think a ratio of 100/1500 is a bit too low.

@Inkognitovsky how do you pick your style relus? do you use the default ones?

@ProGamerGov
Copy link

ProGamerGov commented Jun 21, 2016

@Inkognitovsky @htoyryla

Using this command:

th neural_style.lua -seed 219 -content_image content.jpg -style_image style.jpg -content_weight 100 -style_weight 1500 -init image -normalize_gradients

How do I get the -style_layer_weights parameter to increase the style weight of relu4_1 without changing the style weights of the other layers?

Would this achieve the task?

th neural_style3.lua -image_size 1000 -content_image content.jpg -style_image image.jpg -content_layers relu4_2 -style_layers relu1_1,relu2_1,relu3_1,relu4_1,relu5_1 -style_layer_weights 1,1,1,20,1-content_weight 100 -style_weight 1500 -init image -normalize_gradients -num_iterations 1500 -backend cudnn -cudnn_autotune -optimizer adam

@htoyryla
Copy link

htoyryla commented Jun 21, 2016

First you need to know which style layers you are using. The weights need to be given in the same order. In that command line you are using the default style layers: relu1_1,relu2_1,relu3_1,relu4_1,relu5_1.

To increase the weight of style layer relu4_1, set -style_layer_weights 1,1,1,10,1
That sets relu1_1 relative weight to 1 and so on, relu4_1 relative weight to 10, and relu5_1 again to 1.
By relative weight I mean that the real weight will be 1 times style_weight and 10 times style_weight, respectively.

Assuming you are using my version with style layer weights. This discussion is, as far as I know, about the original neural_style.

@ProGamerGov
Copy link

@htoyryla I am using the default layers.

The weights need to be given in the same order. In that command line you are using the default style layers: relu1_1,relu2_1,relu3_1,relu4_1,relu5_1.

To increase the weight of style layer relu4_1, set -style_layer_weights 1,1,1,10,1

This is what I was wondering about, thanks for the answer!

@ProGamerGov
Copy link

@Inkognitovsky Any progress on farther refining the settings to resemble Ostagram's results?

@kirilledelman
Copy link

@htoyryla Heya, could you update your repo and merge with most recent jcjohnson? I couldn't get original_colors param to work with yours. Thank you!

@htoyryla
Copy link

I'd rather not, sorry to say. Style layer weights was an experiment that made sense back then. After that, jcjohnson made a complete rewrite of his code.

I've done lots of experiments with neural-style code, but don't really have time and interest to maintain old experimental code.

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

8 participants