crowsonkb / style_transfer

Data-parallel image stylization using Caffe.
MIT License
113 stars 14 forks source link

Would implementing style_transfer's tiling solution in Neural-Style be possible? #10

Closed ProGamerGov closed 7 years ago

ProGamerGov commented 7 years ago

I can see the tiling code for style_transfer here.

I have been trying to implement tiling into Neural-Style with a tiling script, but I can't seem to solve the problem of "style shift" that occurs between the tiles. I know style_transfer seems to solve this problem, but is style_transfer's solution able to be implemented in LUA or Bash/Shell? Or should I seek a different solution?

Edit: To clarify, I am asking whether or not your tiling solution requires things that are not available in Lua, and whether or it requires a compiled version of Caffe.

crowsonkb commented 7 years ago

It should be implementable in Lua but I think it would not be possible to do as an external script. It works by splitting the image into differently offset tiles each iteration, recombining the processed tiles, and applying tile seam suppression. This stops visible tile seams from accumulating in the image. Also, you have to compute the target feature maps and Gram matrices in a tiled way so that you do not run out of memory.