Using the retrained models in the sample Android app
To use our retrained Inception v3 model and MobileNet model in Android's TF Classify app is also pretty straightforward. Follow the steps here to test both retrained models:
- Open the sample TensorFlow Android app, located in
tensorflow/examples/android
, using Android Studio. - Drag and drop two retrained models,
quantized_stripped_dogs_retrained .pb
anddog_retrained_mobilenet10_224.pb
as well as the label file,dog_retrained_labels.txt
to theassets
folder of the android app. - Open the file
ClassifierActivity.java
, to use the Inception v3 retrained model, and replace the following code:
private static final int INPUT_SIZE = 224; private static final int IMAGE_MEAN = 117; private static final float IMAGE_STD = 1; private static final String INPUT_NAME = "input"; private static final String OUTPUT_NAME = "output";
With these lines:
private static final int INPUT_SIZE = 299; private static final int IMAGE_MEAN = 128; private static final float...