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

Run on Mobile? #1

Open
InternetMaster1 opened this issue Jun 25, 2020 · 4 comments
Open

Run on Mobile? #1

InternetMaster1 opened this issue Jun 25, 2020 · 4 comments

Comments

@InternetMaster1
Copy link

Amazing Library!

Can this run on a mobile device, say Android?

@divyanshu092
Copy link
Owner

Hi,
Yes, this project is based on Google Colab so it can be run on any device.
You should first mount your google drive, then clone this repo and go to the project's Code folder and run the Photorealistic.ipynb. You can follow this article for cloning the repo on your google drive: https://medium.com/@ashwindesilva/how-to-use-google-colaboratory-to-clone-a-github-repository-e07cf8d3d22b

@InternetMaster1
Copy link
Author

Thanks for the quick reply.

  1. I meant, can I run on Android on a Mobile GPU similar to this library : https://www.tensorflow.org/lite/models/style_transfer/overview
    I would have to convert the model files to tflite?

  2. What is the execution time for the style transfer and the size of the quantized mode? If you check the above link, there is a table at the bottom which gives the performance benchmarks for Google's implementation.
    image

How does photorealistic style transfer compare?

  1. The Google Style Transfer library's output creates a lot of distortions. If I take a human face as a content image and apply style transfer, it shows a lot of wrinkles on the face. Your library would give better results?

@divyanshu092
Copy link
Owner

Hello,
I don't have much idea regarding how this would run on Mobile GPU, but with the advent of Pytorch Mobile, it might be possible to deploy any Pytorch model to both Android and IOS.
The comparison would make sense when we actually deploy on mobile GPU. As of now, I am using Google Colab and the algorithm is an iterative one which improves over time. However, good results take time in the order of minutes.

If I take a human face as content image and apply photorealistic style transfer, the wrinkles/distortions highly depend on the style to which we are wishing to transfer. I would attach a few examples, so you can compare.

@divyanshu092
Copy link
Owner

divyanshu092 commented Jul 2, 2020

It also requires some changes in the hyper-parameters while testing on human faces giving more weight to content.
I am attaching a content image, some style images and the photorealistic style transfer result images.

person2
pen_portrait
person2_pen_portrait
Van-Gogh
person2_Van-gogh
Vassily
person2_Vassily

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

2 participants