-
Notifications
You must be signed in to change notification settings - Fork 195
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
Comments
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? |
I extracted the raw weights/bias from the model and save them as binary file without any format/header etc to save space. |
Ok, do you use a library to use that binary in the app or do you do that manually? |
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. |
Thank you that was very helpful! |
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
The text was updated successfully, but these errors were encountered: