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:
- For Caffe2, clone the main repository and execute the
build_android.sh
script found in thescripts/
folder. This will produce artifacts likelibcaffe2.a
under thebuild_android
folder. Copy these underapp/src/main/jniLibs/armeabi-v7a
. - For
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.