SergeyMorugin / ostagram

1.08k stars 205 forks source link

How to use? #3

Open AndroidDeveloperLB opened 8 years ago

AndroidDeveloperLB commented 8 years ago

Does the whole computation work on the client side, or server side? How can I use this app? Suppose I have 2 image files, what do I do to perform the cool merged-image? Is it free to use? What's the license?

fergalhanley commented 8 years ago

This implementation would need to be server side and CPU/GPU intensive. I've been wondering whether this kind of technique could be implemented in a WebGL shader for a web deployable client.

AndroidDeveloperLB commented 8 years ago

Is the code that's here in Github include all that the server would need to do? Is it possible to port it to Java, so that we could use it in various platforms? Is there any website that uses this technique and allows users to upload 2 images and get the result later, like this website that created deep-dream images : http://deepdreamgenerator.com/ ?

fergalhanley commented 8 years ago

I'm evaluating whether this can be done and I yes it seems like everything is here. Dreamscopeapp.com provides a similar service but with preset styles rather than combining 2 images.

cavinsmith commented 8 years ago

Is the code that's here in Github include all that the server would need to do?

This is web service (ostagram.ru), not the generator itself. It runs on any configured server. Software which is used here is neural-style with pre-trained neural network. Neural style is written in [LUA](https://en.wikipedia.org/wiki/Lua_(programming_language) and is working on Torch - it is also multi-platform. Mine combo is successfully running on OSX

cavinsmith commented 8 years ago

@AndroidDeveloperLB are you sure you are not going to run it on android phone? It will work, but extremely slow unless you have Tegra CPU with CUDA cores.

AndroidDeveloperLB commented 8 years ago

@cavinsmith Actually it would be great if I could create an app that does it. I could give it the option to do it all on Android, or send to a server that will return an answer to me when it's done, or something.

How hard would it be to convert it all to Java?

cavinsmith commented 8 years ago

@AndroidDeveloperLB sending it to server is easy way - you don't need this repo, you only need neural-style and any interface to exchange images. Your frontend on android could be written in anything you like.

I don't think it is impossible to run neural-style on android (but it's really useless) and I'm sure it's extremely hard to remake it to java - there is not only "code" there is torch, cuda routines, caffe etc etc... What for do you want to do it? Who needs app that works slow as hell or wants tegra cpu?

AndroidDeveloperLB commented 8 years ago

well it could be for benchmark too. Also, Android does have its own solution for mutli-threads: RenderScript. Not sure though how to use it here, and if it can even work using it.