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

AdaIN-style iOS App #22

Open
ArtlyStyles opened this issue Jun 30, 2017 · 5 comments
Open

AdaIN-style iOS App #22

ArtlyStyles opened this issue Jun 30, 2017 · 5 comments

Comments

@ArtlyStyles
Copy link

I developed an iOS App based on AdaIN. It is free. https://itunes.apple.com/us/app/artx-style-transfer-between-any-two-images/id1246635833?ls=1&mt=8 More info at http://www.artxstyles.com

@ArtlyStyles ArtlyStyles changed the title AdaIN-style - iOS App AdaIN-style iOS App Jun 30, 2017
@alexiscreuzot
Copy link

Hey, I'm looking into doing something of that effect for a project. Did you convert the t7 to mlmodels or did you go directly with torch-ios?

@ArtlyStyles
Copy link
Author

I extracted the raw weights/bias from the model and save them as binary file without any format/header etc to save space.

@alexiscreuzot
Copy link

Ok, do you use a library to use that binary in the app or do you do that manually?

@ArtlyStyles
Copy link
Author

ArtlyStyles commented Apr 9, 2018

Everything is kind of "manual". I used some of the Metal Performance Shader layers, as documented in this page https://developer.apple.com/documentation/metalperformanceshaders. But MPS does not have all the layers needed for AdaIN. So I implemented some myself using Metal Shading Language (https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf#//apple_ref/doc/uid/TP40014364) for the GPU on iPhone. I had to debug line-by-line to make sure my layer produced the same result as Torch.

Apple later released CoreML. But it seems CoreML still does not have all the layers needed for the Fast Neural Style (Stanford version and my app "Artly") and AdaIn.

If you want to programming MPS and have questions, I can definitely help you.

@alexiscreuzot
Copy link

Thank you that was very helpful!
I am a newbie in ML and never used MPS but I'll look into all that. I am very impressed by your application!

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