- Machine Learning Projects for Mobile Applications
- Karthikeyan NG
- 222字
- 2021-06-10 19:41:39
TensorFlow Lite on Android Studio
You can download and build TensorFlow Lite directly from Android Studio by following these steps:
- Download and install the latest version of Android Studio.
- In your studio settings, make sure that the NDK version is greater than 14 and the SDK version is greater than 26. We are using 27 in this book and on further applications. We will look in detail at how to configure this in further projects.
- You can download the application from the link in the following information box.
- As Android Studio instructs, you need to install all the Gradle dependencies.
The demo app can be found at: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/lite/java/demo/app/src/main/java/com/example/android/tflitecamerademo.
We need a model in order to use it in the application. We can either use an existing model or train our own model. Let's use an existing model in this application.
You can download models at the link given next, in the information box. You can also download the zipped model file from the link given:
- You can download an Inception-v3 floating point model or the latest MobileNet model. Copy the appropriate .tflite to the Android app's assets directory. You can then change the classifier in the Camera2BasicFragment.java file, tensorflow/contrib/lite/java/demo/app/src/main/assets/.
The models can be downloaded from: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/lite/g3doc/models.md.
Now, you can build and run the demo app.
推薦閱讀
- Arduino入門基礎教程
- 新媒體跨界交互設計
- Cortex-M3 + μC/OS-II嵌入式系統開發入門與應用
- Augmented Reality with Kinect
- 計算機組裝與系統配置
- 基于Proteus和Keil的C51程序設計項目教程(第2版):理論、仿真、實踐相融合
- 辦公通信設備維修
- 筆記本電腦維修不是事兒(第2版)
- Rapid BeagleBoard Prototyping with MATLAB and Simulink
- Internet of Things Projects with ESP32
- BeagleBone Robotic Projects
- 數字媒體專業英語(第2版)
- Managing Data and Media in Microsoft Silverlight 4:A mashup of chapters from Packt's bestselling Silverlight books
- FL Studio Cookbook
- 單片機原理及應用