This pattern shows how to create an app for an Anki Cozmo toy robot to recognize three types of other toys (a deer, adragon, and a dinosaur). The sample application uses an extended MobileNet model. Predictions against that model are executed by TensorFlow running in an OpenWhisk function. The training is done on Kubernetes on IBM Cloud.
This code pattern contains a sample application that uses an extended MobileNet TensorFlow model to aid an Ansi Cozmo toy robot in recognizing different toys. The predictions are executed by TensorFlow running in an OpenWhisk function.
This code pattern is an extension of the TensorFlow for Poets tutorial, which describes how to retrain MobileNet’s final layer of a neural network for new categories. It is based on the previous work by Niklas Heidloff at Sample Application: how to use TensorFlow in OpenWhisk.
This code pattern works with the following components:
- Cloud Object Storage: Store, manage, and access your data in a cloud data store.
- Kubernetes: Manage highly available apps inside Docker containers and Kubernetes clusters on the IBM Cloud.
- Cloud Functions (powered by Apache OpenWhisk): Execute code on demand in a highly scalable, serverless environment.
- Tensorflow: Use an open source software library for numerical computation using data flow graphs.
This code pattern shows you how to complete the following tasks:
- Create a TensorFlow model.
- Deploy Docker images.
- Create Cloud Functions.
- Start a simple Cloud Foundry web app.
- The developer takes pictures (possibly, but not necessarily with an Anzi Cozmo robot) and uploads them to IBM Cloud Object Storage.
- The developer builds a Docker image containing TensorFlow and triggers Kubernetes to run the “training” container.
- The training container loads images from Cloud Object Storage.
- TensorFlow trains the neural network and uploads the trained net back to Cloud Object Storage.
- The developer builds a “classifier” Docker image that contains TensorFlow and uses it to create an IBM Cloud Functions action/sequence.
- The developer triggers the Cloud Function with an image, either from the sample web app or from the robot.
- The pre-trained TensorFlow graph is retrieved from Cloud Object Storage.
- The image is classified and the result is returned.
Find detailed technical steps for this code pattern in the README.md file in the GitHub repository.
- Take pictures.
- Upload pictures.
- Train the model.
- Deploy the model to Open Whisk.
- Test the model through the web application.
- Test the visual recognition with the Cozmo robot.