DavidTorresOcana / ros_object_detector

A ROS package to run Tensorflow models for object detection and image segmentation
6 stars 1 forks source link

ROS Tensorflow objects detector

A ROS package to run any Tensorflow model for object detection or image segmentation using a camera video feed.

Tested on a Drive PX2 running a SSD-Mobilenet at 19FPS. It takes about 3mins to open a session, so be patient when running this node.

Maintainers

Requirements

Package description

Node

Main node is detector_node.py

Tensorflow model

Model definitions must be placed inside /include/ros_object_detector

As example, the model used is a SSD-Inception detecting potholes

Models' files:

Parameters

Usage

There are three options to use this package.

use a camera:

$ rosrun cv_camera cv_camera_node

1. Using default model and topics

Usig default parameters and model definition:

$ rosrun ros_object_detector detector_node.py

2. Using your model and topics: Use configuration file

If you want to configure the node to set different parameters, you can use roslaunch and /config/default.yaml file.

$ roslaunch ros_object_detector ros_object_detector.launch

or, to launch also the camera node

$ roslaunch ros_object_detector ros_object_detector_all.launch

3. Using your model and topics: on command line

You can also set any of the parameters when calling the node, by using any of the arguments below.

$ rosrun ros_object_detector detector_node.py _tf_model/pb_path:=path-to-your-models-pb.pb _tf_model/labels_definition:=path-to-your-labels.pbtxt _tf_model/num_objects:=your-models-num-objects _camera_topic:=input-camera-topic _out_img_topic:=output-image-topic

E.g.: To use a different camera topic:

$ rosrun ros_object_detector detector_node.py _camera_topic:=input-camera-topic

Note that, otherwise specified, node will use default parameters.

TODOs