Run and measure the performance of TensorFlow Lite GPU Delegate on Android NDK.
- Detect faces and estimage their Age and Gender
- based on pretrained model of https://github.com/yu4u/age-gender-estimation
- Depth Estimation from single images.
- based on pretrained model of https://github.com/ialhashim/DenseDepth
- Generate anime-style face image.
- based on pretrained model of https://github.com/margaretmz/Selfie2Anime-with-TFLite
- Transform photos into anime style images.
- based on pretrained model of https://github.com/TachibanaYoshino/AnimeGANv2
- Human portrait drawing by U^2-Net.
- Enhance low-light images upto a great extent.
- based on pretrained model of https://github.com/sayakpaul/MIRNet-TFLite
- Download and install Android NDK.
$ mkdir ~/Android/
$ mv ~/Download/android-ndk-r20b-linux-x86_64.zip ~/Android
$ cd ~/Android
$ unzip android-ndk-r20b-linux-x86_64.zip
- Download and install bazel.
$ wget https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-installer-linux-x86_64.sh
$ chmod 755 bazel-3.1.0-installer-linux-x86_64.sh
$ sudo ./bazel-3.1.0-installer-linux-x86_64.sh
- run the build script to build TensorFlow Library
$ mkdir ~/work
$ git clone https://github.com/terryky/android_tflite.git
$ cd android_tflite/third_party/
$ ./build_libtflite_r2.4_android.sh
(Tensorflow configure will start after a while. Please enter according to your environment)
$ ls -l tensorflow/bazel-bin/tensorflow/lite/
-r-xr-xr-x 1 terryky terryky 3118552 Dec 26 19:58 libtensorflowlite.so*
$ ls -l tensorflow/bazel-bin/tensorflow/lite/delegates/gpu/
-r-xr-xr-x 1 terryky terryky 80389344 Dec 26 19:59 libtensorflowlite_gpu_delegate.so*
$ cd ~/work/android_tflite
$ ./download_all_assets.sh
- Download and install Android Studio.
- Start Android Studio.
$ cd ${ANDROID_STUDIO_INSTALL_DIR}/android-studio/bin/
$ ./studio.sh
- Install NDK 20.0 by SDK Manager of Android Studio.
- Open application folder (eg.
~/work/android_tflite/tflite_posenet
). - Build and Run.
Host PC | Target Device |
---|---|
x86_64 | arm64-v8a |
Ubuntu 18.04.4 LTS | Android 9 (API Level 28) |
Android NDK r20b |
- https://github.com/google/mediapipe
- https://github.com/yu4u/age-gender-estimation
- https://github.com/TachibanaYoshino/AnimeGANv2
- https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/python_demos/human_pose_estimation_3d_demo
- https://github.com/ialhashim/DenseDepth
- https://github.com/MaybeShewill-CV/bisenetv2-tensorflow
- https://github.com/margaretmz/Selfie2Anime-with-TFLite
- https://github.com/NathanUA/U-2-Net
- https://tfhub.dev/sayakpaul/lite-model/east-text-detector/int8/1
- https://github.com/PINTO0309/PINTO_model_zoo