Open StryxZilla opened 8 years ago
Did you try, Ostagram?
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.
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).
StryxZilla, do you have any results ? what settings ostagram uses.
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.
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 "https://github.com/jcjohnson/neural-style/issues/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
@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.
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?
@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
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.
@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!
@Inkognitovsky Any progress on farther refining the settings to resemble Ostagram's results?
@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!
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.
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?