Neural style transfer on your Android phone.
AICamera is an Android application showcasing implementations of Caffe2 models for mobile. This particular fork implements Neural Style Transfer, a unique way of applying artistic styles to photos using deep neural networks.
The app depends mainly on the Caffe2 library to run the models, and libyuv which is used for image processing. All dependencies are contained in this repository, so no further setup is required.
If you do want to build the dependencies yourself (for example to pull in more recent versions of one of the libraries), here are a few steps:
build_android.sh
script found in the scripts/
folder. This will produce artifacts like
libcaffe2.a
under the build_android
folder. Copy these under app/src/main/jniLibs/armeabi-v7a
.libyuv
, follow the steps
here.
If the build fails on macOS, consider building on Linux inside a
Docker container.All of these steps assume you have a proper Android SDK and NDK environment in place.
Building the app is as easy as downloading Android Studio and pressing the green button.
Tested successfully on Samsung Galaxy S7 and S8.