Closed subzerofun closed 7 years ago
Line 33 in deepmatting_seg.lua:
cmd:option('-lambda', 1e4)
You can change the default value there or add the -lambda flag in gen_all.py to set it.
Thanks – it's not even that hard to miss. Should've looked more carefully at the code.
Hey there, i was wondering where i can find the λ parameter from the original paper in your code.
The paper states that a value of 10e4 gave the best results, but i woud like to try to experiment a little bit with lower values. I imagine that a lower value could preserve more style detail – for the cost of looking more like the CNNMRF method.
Am i simply overlooking the parameter because it's named differently or is it hidden in the more complex functions?
I also tried playing around with
f_radius
– reducing the value preserved more detail – transferred more style detail to the final image. Could you explain whatf_edge
does?Since you have a lot of landscape examples, but no animals, my test example was an attempt to transfer the style of a tiger to a housecat 😀. Maybe CNNMRF would be better suited for that – but i wanted to take advantage of the photorealistic effect of this method. CNNMRF would make the final image look more like a painting, and i've seen that often enough by now. The masking of your method offers a great degree of control for finetuning how you want your output to look like. EDIT: I wrote lion, but of course it's a tiger... Note to self: stripes? = tiger. no stripes, furry mane? = lion. If you f*ck with nature? = liger
Temp result (neural style):
Final results :-) : (f_radius @ 5 – 0.5)
And the masks:
Mask colors
Another quick question about the colors you can use for your mask pngs: In
neuralstyle_seg.lua
anddeepmatting_seg.lua
you define that these colors are processed from the segmentation images:The problem for me (and maybe others users too) was to recognize that you are restricted to these colors when you "paint" your masks. At first i didn't look at the code and just chose random colors – i only realized that something was wrong when the generated output didn't match my selections.
So could you maybe include a info in your Readme how to manually create a mask – which colors you can use (maybe hex colors?). I'm not sure if everyone automatically knows what colors are actually processed.
Thanks!