├── .gitignore ├── LICENSE ├── README.md ├── classify_image.py └── image_recognition.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | rostensorflow 2 | ===================== 3 | 4 | - Install TensorFlow (see [tensor flow install guide](https://www.tensorflow.org/install/install_linux)) 5 | - Install ROS (see http://wiki.ros.org) 6 | - Install cv-bridge 7 | 8 | ```bash 9 | $ sudo apt-get install ros-kinetic-cv-bridge ros-kinetic-opencv3 10 | ``` 11 | 12 | - (Optional) Install camera driver (for example, cv_camera) 13 | 14 | ```bash 15 | $ sudo apt-get install ros-kinetic-cv-camera 16 | ``` 17 | 18 | 19 | TensorFlow install note (without GPU) 20 | ------------------------------------------- 21 | Please read official guide. This is a only note for me. 22 | 23 | ```bash 24 | $ sudo apt-get install python-pip python-dev python-virtualenv 25 | $ virtualenv --system-site-packages ~/tensorflow 26 | $ source ~/tensorflow/bin/activate 27 | $ pip install --upgrade tensorflow 28 | ``` 29 | 30 | image_recognition.py 31 | -------------------------------- 32 | 33 | * publish: /result (std_msgs/String) 34 | * subscribe: /image (sensor_msgs/Image) 35 | 36 | How to try 37 | 38 | ```bash 39 | $ roscore 40 | $ rosrun cv_camera cv_camera_node 41 | $ source ~/tensorflow/bin/activate 42 | $ python image_recognition.py image:=/cv_camera/image_raw 43 | $ rostopic echo /result 44 | ``` 45 | -------------------------------------------------------------------------------- /classify_image.py: -------------------------------------------------------------------------------- 1 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # ============================================================================== 15 | 16 | # this file is from https://github.com/tensorflow/models 17 | 18 | """Simple image classification with Inception. 19 | 20 | Run image classification with Inception trained on ImageNet 2012 Challenge data 21 | set. 22 | 23 | This program creates a graph from a saved GraphDef protocol buffer, 24 | and runs inference on an input JPEG image. It outputs human readable 25 | strings of the top 5 predictions along with their probabilities. 26 | 27 | Change the --image_file argument to any jpg image to compute a 28 | classification of that image. 29 | 30 | Please see the tutorial and website for a detailed description of how 31 | to use this script to perform image recognition. 32 | 33 | https://tensorflow.org/tutorials/image_recognition/ 34 | """ 35 | 36 | from __future__ import absolute_import 37 | from __future__ import division 38 | from __future__ import print_function 39 | 40 | import argparse 41 | import os.path 42 | import re 43 | import sys 44 | import tarfile 45 | 46 | import numpy as np 47 | from six.moves import urllib 48 | import tensorflow as tf 49 | 50 | FLAGS = None 51 | 52 | # pylint: disable=line-too-long 53 | DATA_URL = 'http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz' 54 | # pylint: enable=line-too-long 55 | 56 | 57 | class NodeLookup(object): 58 | """Converts integer node ID's to human readable labels.""" 59 | 60 | def __init__(self, 61 | label_lookup_path=None, 62 | uid_lookup_path=None): 63 | if not label_lookup_path: 64 | label_lookup_path = os.path.join( 65 | FLAGS.model_dir, 'imagenet_2012_challenge_label_map_proto.pbtxt') 66 | if not uid_lookup_path: 67 | uid_lookup_path = os.path.join( 68 | FLAGS.model_dir, 'imagenet_synset_to_human_label_map.txt') 69 | self.node_lookup = self.load(label_lookup_path, uid_lookup_path) 70 | 71 | def load(self, label_lookup_path, uid_lookup_path): 72 | """Loads a human readable English name for each softmax node. 73 | 74 | Args: 75 | label_lookup_path: string UID to integer node ID. 76 | uid_lookup_path: string UID to human-readable string. 77 | 78 | Returns: 79 | dict from integer node ID to human-readable string. 80 | """ 81 | if not tf.gfile.Exists(uid_lookup_path): 82 | tf.logging.fatal('File does not exist %s', uid_lookup_path) 83 | if not tf.gfile.Exists(label_lookup_path): 84 | tf.logging.fatal('File does not exist %s', label_lookup_path) 85 | 86 | # Loads mapping from string UID to human-readable string 87 | proto_as_ascii_lines = tf.gfile.GFile(uid_lookup_path).readlines() 88 | uid_to_human = {} 89 | p = re.compile(r'[n\d]*[ \S,]*') 90 | for line in proto_as_ascii_lines: 91 | parsed_items = p.findall(line) 92 | uid = parsed_items[0] 93 | human_string = parsed_items[2] 94 | uid_to_human[uid] = human_string 95 | 96 | # Loads mapping from string UID to integer node ID. 97 | node_id_to_uid = {} 98 | proto_as_ascii = tf.gfile.GFile(label_lookup_path).readlines() 99 | for line in proto_as_ascii: 100 | if line.startswith(' target_class:'): 101 | target_class = int(line.split(': ')[1]) 102 | if line.startswith(' target_class_string:'): 103 | target_class_string = line.split(': ')[1] 104 | node_id_to_uid[target_class] = target_class_string[1:-2] 105 | 106 | # Loads the final mapping of integer node ID to human-readable string 107 | node_id_to_name = {} 108 | for key, val in node_id_to_uid.items(): 109 | if val not in uid_to_human: 110 | tf.logging.fatal('Failed to locate: %s', val) 111 | name = uid_to_human[val] 112 | node_id_to_name[key] = name 113 | 114 | return node_id_to_name 115 | 116 | def id_to_string(self, node_id): 117 | if node_id not in self.node_lookup: 118 | return '' 119 | return self.node_lookup[node_id] 120 | 121 | 122 | def create_graph(): 123 | """Creates a graph from saved GraphDef file and returns a saver.""" 124 | # Creates graph from saved graph_def.pb. 125 | with tf.gfile.FastGFile(os.path.join( 126 | FLAGS.model_dir, 'classify_image_graph_def.pb'), 'rb') as f: 127 | graph_def = tf.GraphDef() 128 | graph_def.ParseFromString(f.read()) 129 | _ = tf.import_graph_def(graph_def, name='') 130 | 131 | 132 | def run_inference_on_image(image): 133 | """Runs inference on an image. 134 | 135 | Args: 136 | image: Image file name. 137 | 138 | Returns: 139 | Nothing 140 | """ 141 | if not tf.gfile.Exists(image): 142 | tf.logging.fatal('File does not exist %s', image) 143 | image_data = tf.gfile.FastGFile(image, 'rb').read() 144 | 145 | # Creates graph from saved GraphDef. 146 | create_graph() 147 | 148 | with tf.Session() as sess: 149 | # Some useful tensors: 150 | # 'softmax:0': A tensor containing the normalized prediction across 151 | # 1000 labels. 152 | # 'pool_3:0': A tensor containing the next-to-last layer containing 2048 153 | # float description of the image. 154 | # 'DecodeJpeg/contents:0': A tensor containing a string providing JPEG 155 | # encoding of the image. 156 | # Runs the softmax tensor by feeding the image_data as input to the graph. 157 | softmax_tensor = sess.graph.get_tensor_by_name('softmax:0') 158 | predictions = sess.run(softmax_tensor, 159 | {'DecodeJpeg/contents:0': image_data}) 160 | predictions = np.squeeze(predictions) 161 | 162 | # Creates node ID --> English string lookup. 163 | node_lookup = NodeLookup() 164 | 165 | top_k = predictions.argsort()[-FLAGS.num_top_predictions:][::-1] 166 | for node_id in top_k: 167 | human_string = node_lookup.id_to_string(node_id) 168 | score = predictions[node_id] 169 | print('%s (score = %.5f)' % (human_string, score)) 170 | 171 | 172 | def maybe_download_and_extract(): 173 | """Download and extract model tar file.""" 174 | dest_directory = FLAGS.model_dir 175 | if not os.path.exists(dest_directory): 176 | os.makedirs(dest_directory) 177 | filename = DATA_URL.split('/')[-1] 178 | filepath = os.path.join(dest_directory, filename) 179 | if not os.path.exists(filepath): 180 | def _progress(count, block_size, total_size): 181 | sys.stdout.write('\r>> Downloading %s %.1f%%' % ( 182 | filename, float(count * block_size) / float(total_size) * 100.0)) 183 | sys.stdout.flush() 184 | filepath, _ = urllib.request.urlretrieve(DATA_URL, filepath, _progress) 185 | print() 186 | statinfo = os.stat(filepath) 187 | print('Successfully downloaded', filename, statinfo.st_size, 'bytes.') 188 | tarfile.open(filepath, 'r:gz').extractall(dest_directory) 189 | 190 | 191 | def main(_): 192 | maybe_download_and_extract() 193 | image = (FLAGS.image_file if FLAGS.image_file else 194 | os.path.join(FLAGS.model_dir, 'cropped_panda.jpg')) 195 | run_inference_on_image(image) 196 | 197 | 198 | def setup_args(): 199 | parser = argparse.ArgumentParser() 200 | # classify_image_graph_def.pb: 201 | # Binary representation of the GraphDef protocol buffer. 202 | # imagenet_synset_to_human_label_map.txt: 203 | # Map from synset ID to a human readable string. 204 | # imagenet_2012_challenge_label_map_proto.pbtxt: 205 | # Text representation of a protocol buffer mapping a label to synset ID. 206 | parser.add_argument( 207 | '--model_dir', 208 | type=str, 209 | default='/tmp/imagenet', 210 | help="""\ 211 | Path to classify_image_graph_def.pb, 212 | imagenet_synset_to_human_label_map.txt, and 213 | imagenet_2012_challenge_label_map_proto.pbtxt.\ 214 | """ 215 | ) 216 | parser.add_argument( 217 | '--image_file', 218 | type=str, 219 | default='', 220 | help='Absolute path to image file.' 221 | ) 222 | parser.add_argument( 223 | '--num_top_predictions', 224 | type=int, 225 | default=5, 226 | help='Display this many predictions.' 227 | ) 228 | global FLAGS 229 | FLAGS, unparsed = parser.parse_known_args() 230 | return unparsed 231 | 232 | 233 | if __name__ == '__main__': 234 | tf.app.run(main=main, argv=[sys.argv[0]] + setup_args()) 235 | -------------------------------------------------------------------------------- /image_recognition.py: -------------------------------------------------------------------------------- 1 | import rospy 2 | from sensor_msgs.msg import Image 3 | from std_msgs.msg import String 4 | from cv_bridge import CvBridge 5 | import cv2 6 | import numpy as np 7 | import tensorflow as tf 8 | import classify_image 9 | 10 | 11 | class RosTensorFlow(): 12 | def __init__(self): 13 | classify_image.maybe_download_and_extract() 14 | self._session = tf.Session() 15 | classify_image.create_graph() 16 | self._cv_bridge = CvBridge() 17 | 18 | self._sub = rospy.Subscriber('image', Image, self.callback, queue_size=1) 19 | self._pub = rospy.Publisher('result', String, queue_size=1) 20 | self.score_threshold = rospy.get_param('~score_threshold', 0.1) 21 | self.use_top_k = rospy.get_param('~use_top_k', 5) 22 | 23 | def callback(self, image_msg): 24 | cv_image = self._cv_bridge.imgmsg_to_cv2(image_msg, "bgr8") 25 | # copy from 26 | # classify_image.py 27 | image_data = cv2.imencode('.jpg', cv_image)[1].tostring() 28 | # Creates graph from saved GraphDef. 29 | softmax_tensor = self._session.graph.get_tensor_by_name('softmax:0') 30 | predictions = self._session.run( 31 | softmax_tensor, {'DecodeJpeg/contents:0': image_data}) 32 | predictions = np.squeeze(predictions) 33 | # Creates node ID --> English string lookup. 34 | node_lookup = classify_image.NodeLookup() 35 | top_k = predictions.argsort()[-self.use_top_k:][::-1] 36 | for node_id in top_k: 37 | human_string = node_lookup.id_to_string(node_id) 38 | score = predictions[node_id] 39 | if score > self.score_threshold: 40 | rospy.loginfo('%s (score = %.5f)' % (human_string, score)) 41 | self._pub.publish(human_string) 42 | 43 | def main(self): 44 | rospy.spin() 45 | 46 | if __name__ == '__main__': 47 | classify_image.setup_args() 48 | rospy.init_node('rostensorflow') 49 | tensor = RosTensorFlow() 50 | tensor.main() 51 | --------------------------------------------------------------------------------