TFDroid | A simple demo for using Tensorflow models in Android apps | Android library
kandi X-RAY | TFDroid Summary
kandi X-RAY | TFDroid Summary
A simple demo for using Tensorflow models in Android apps.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initializes the model
TFDroid Key Features
TFDroid Examples and Code Snippets
Community Discussions
Trending Discussions on TFDroid
QUESTION
I'm trying to figure out how to use a tensorflow model from training the image_ocr example in Keras on Android. I've followed this tutorial in creating a tensorflow model (i.e. freezing the graph to creata a .pb file) to be used by the application.
The examples in TFDroid are pretty good but none of them seem to be applicable with the model I have. I have a few questions for now:
- What are the things to consider when you're going to use a model of your own on Android?
- What's the workflow from training a tensorflow model to using it on Android?
ANSWER
Answered 2017-May-23 at 19:50I'm working on better documentation around this, but for now here's an extract from my current draft that may help:
In most situations, training a model with TensorFlow will give you a folder containing a GraphDef file (usually ending with the .pb or .pbtxt extension) and a set of checkpoint files. What you need for mobile or embedded deployment is a single GraphDef file that’s been ‘frozen’, or had its variables converted into inline constants so everything’s in one file. To handle the conversion, you’ll need the freeze_graph.py script, that’s held in tensorflow/pythons/tools/freeze_graph.py. You’ll run it like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TFDroid
You can use TFDroid like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the TFDroid component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page