diff --git a/README.md b/README.md index aa23a230..22eb71c3 100644 --- a/README.md +++ b/README.md @@ -179,11 +179,11 @@ One-step installation scripts are provided for the dependencies' installation. P * run object detection service sample code input from Image Run image processing service: ```bash - ros2 run dynamic_vino_sample image_object_server + ros2 run dynamic_vino_sample image_object_server "image_object_server_oss.yaml" ``` Run example application with an absolute path of an image on another console: ```bash - ros2 run dynamic_vino_sample image_object_client "~/Pictures/car.jpeg" + ros2 run dynamic_vino_sample image_object_client ~/Pictures/car.png ``` # TODO Features diff --git a/doc/BINARY_VERSION_README.md b/doc/BINARY_VERSION_README.md index a7684b8e..8bb1ebcc 100644 --- a/doc/BINARY_VERSION_README.md +++ b/doc/BINARY_VERSION_README.md @@ -172,6 +172,16 @@ This project is a ROS2 wrapper for CV API of [OpenVINO™](https://software.inte ```bash ros2 launch dynamic_vino_sample pipeline_video.launch.py ``` +* run object detection service sample code input from Image + Run image processing service: + ```bash + ros2 run dynamic_vino_sample image_object_server "image_object_server.yaml" + ``` + Run example application with an absolute path of an image on another console: + ```bash + ros2 run dynamic_vino_sample image_object_client ~/Pictures/car.png + ``` + ## 6.Known Issues * Possible problems * When running sample with Intel® Neural Compute Stick 2 occurred error: diff --git a/sample/param/image_object_server.yaml b/sample/param/image_object_server.yaml index 3a6cf755..aacd8e67 100644 --- a/sample/param/image_object_server.yaml +++ b/sample/param/image_object_server.yaml @@ -14,6 +14,6 @@ Pipelines: right: [ObjectDetection] - left: ObjectDetection right: [RosService] - input_path: "/home/intel/Pictures/timg.jpeg" + input_path: "/home/intel/Pictures/car.png" Common: diff --git a/sample/param/image_object_server_oss.yaml b/sample/param/image_object_server_oss.yaml new file mode 100644 index 00000000..229bf2da --- /dev/null +++ b/sample/param/image_object_server_oss.yaml @@ -0,0 +1,19 @@ +Pipelines: +- name: object + inputs: [Image] + infers: + - name: ObjectDetection + model: /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/ssd/300/caffe/output/ssd300.xml + engine: CPU + label: to/be/set/xxx.labels + batch: 16 + outputs: [RosService] + confidence_threshold: 0.2 + connects: + - left: Image + right: [ObjectDetection] + - left: ObjectDetection + right: [RosService] + input_path: "/home/intel/Pictures/car.png" + +Common: diff --git a/sample/src/image_object_server.cpp b/sample/src/image_object_server.cpp index 8b8a5463..a6aae111 100644 --- a/sample/src/image_object_server.cpp +++ b/sample/src/image_object_server.cpp @@ -34,7 +34,8 @@ std::string getConfigPath(int argc, char * argv[]) { std::string prefix_path; ament_index_cpp::get_resource("packages", "dynamic_vino_sample", content, &prefix_path); - return prefix_path + "/share/dynamic_vino_sample/param/image_object_server.yaml"; + //return prefix_path + "/share/dynamic_vino_sample/param/image_object_server.yaml"; + return prefix_path + "/share/dynamic_vino_sample/param/" + argv[1]; } int main(int argc, char ** argv) {