After discussing the basics of TensorFlow, let's start discussing how to interface ROS and TensorFlow to do some serious work. In this section, we are going to deal with image recognition using these two. There is a simple package to perform image recognition using TensorFlow and ROS. Here is the ROS package to do this: https://github.com/qboticslabs/rostensorflow.
This package was forked from https://github.com/OTL/rostensorflow. The package basically contains a ROS Python node that subscribes to images from the ROS webcam driver and performs image recognition using TensorFlow APIs. The node will print the detected object and its probability.
The image recognition is mainly done using a model called a deep convolution network. It can achieve high accuracy in the field of image recognition. An improved model we are going to use here is Inception v3 (https://arxiv.org/abs/1512.00567).
When we run the node, it will download a trained Inception v3 model to the computer and classify the object according to the webcam images. You can see the detected object's name and its probability in Terminal. There are a few prerequisites to run this node. Let's go through the dependencies.