Using TensorFlow for image classification

Now that we have written the code in iOS to recognize hot dogs, it is now time to write the code for Android. The first things to do is to add the files we exported from the Custom Vision to the Android project. For TensorFlow, the actual model and the labels (the tags) are separated into two files. Let's set this up by going through the following steps:

  1. Extract the ZIP file that we got from the Custom Vision service.
  2. Find the model.pb file and rename it as hotdog-or-not-model.pb.
  1. Find the labels.txt file and rename it as hotdog-or-not-labels.txt.
  2. Import the files to the Assets folder in the Android project. Make sure that the build action is Android Asset.

When we have imported the files into ...

Get Xamarin.Forms Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.