Code Monkey home page Code Monkey logo

tensorflow_in_ros's Introduction

Tensorflow_in_ROS

I made a ros-node to predict numbers from camera image.
I used Tensorflow tutorial Deep MNIST model(https://www.tensorflow.org/versions/r0.11/tutorials/mnist/pros/index.html)

Before you use this, you must install some programs.

$ sudo apt-get install ros-indigo-cv-bridge ros-indigo-cv-camera

tensorflow_in_ros_mnist.py

This is main file. This make the ros-node.

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

model.ckpt,model.ckpt.meta

This is Trained model. Test set accuracy is approximately 99.2%.

How to try

$ roscore
$ python tensorflow_in_ros_mnist.py image:=/cv_camera/image_raw
$ rosrun cv_camera cv_camera_node
$ rostopic echo /result

If you execute this code after launching a camera-node, this code will make error.
But, it is ok because that is just "now loading" error and predict-code will be executed shortly after init-code finished.

Result

You can see ros-node published predicted numbers. Look at this.
Right picture is 9-image from camera.
Left number is published predicted number.

Result

Reference

This software is released under the Apache License2.0, see LICENSE.txt.

tensorflow_in_ros's People

Contributors

shunchan0677 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.