TensorFlow ImageNet demo using ROS sensor_msgs/Image
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
classify_image.py
image_recognition.py

README.md

rostensorflow

$ sudo apt-get install ros-kinetic-cv-bridge ros-kinetic-opencv3
  • (Optional) Install camera driver (for example, cv_camera)
$ sudo apt-get install ros-kinetic-cv-camera

TensorFlow install note (without GPU)

Please read official guide. This is a only note for me.

$ sudo apt-get install python-pip python-dev python-virtualenv
$ virtualenv --system-site-packages ~/tensorflow
$ source ~/tensorflow/bin/activate
$ pip install --upgrade tensorflow

image_recognition.py

  • publish: /result (std_msgs/String)
  • subscribe: /image (sensor_msgs/Image)

How to try

$ roscore
$ rosrun cv_camera cv_camera_node
$ source ~/tensorflow/bin/activate
$ python image_recognition.py image:=/cv_camera/image_raw
$ rostopic echo /result