Tensorflowdemo port on Android
This article is the official TensorFlow tutorial: the TensorFlow deep learning model, ported to android phones, object recognition, pedestrian detection and other specific implementation process (Android demo official home page:https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android).
I. Download Tensorflow source code
Clone a copy of the source code to your local area or open the link directly to download it to your local area.
Note: The --recurse-submodules parameter is used to prevent protobuf errors later.
II. Setting up the environment
1. Install the build toolbazel
This paper uses thebazel custom APT installation. Reference website https://docs.bazel.build/versions/master/install-ubuntu.htmlcarry out.
1) Install JDK 8:
2) Adding the APT library
3) Install and update Bazel
If it's just an update, run :
2、Install the SDK
2) Way 2: Install via Android Studio (way 1 28.0.0 if error is reported available way 2).
Open WORKSPACE in the tensorflow root directory, find the following piece of code, configure the corresponding version and location of its own SDK, as well as the NDK version and location, and remove the comments.