diff --git a/doc/getting_started_with_Dashing.md b/doc/getting_started_with_Dashing.md deleted file mode 100644 index bd0c7a02..00000000 --- a/doc/getting_started_with_Dashing.md +++ /dev/null @@ -1,120 +0,0 @@ -# ROS2_OpenVINO_Toolkit - -**NOTE:** -Below steps have been tested on **Ubuntu 18.04**. - -## 1. Environment Setup -* Install ROS2 Dashing [(guide)](https://index.ros.org/doc/ros2/Installation/Dashing/) -* Install OpenVINO™ Toolkit Version: 2020.3 [(guide)](https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html) -**Note:** Please use root privileges to run the installer when installing the core components. -* Install Intel® RealSense™ SDK 2.0 [(tag v2.30.0)](https://github.com/IntelRealSense/librealsense/tree/v2.30.0) or later version. - -## 2. Building and Installation -* Build demo code in OpenVINO toolkit -```bash - # root is required instead of sudo - source /opt/intel//bin/setupvars.sh - cd /opt/intel//deployment_tools/open_model_zoo/demos - source build_demos.sh -``` -* Install ROS2_OpenVINO packages -```bash -mkdir -p ~/my_ros2_ws/src -cd ~/my_ros2_ws/src -git clone https://github.com/intel/ros2_openvino_toolkit -git clone https://github.com/intel/ros2_object_msgs -git clone https://github.com/ros-perception/vision_opencv -b ros2 -git clone https://github.com/ros2/message_filters.git -git clone https://github.com/ros-perception/image_common.git -b dashing -git clone https://github.com/intel/ros2_intel_realsense.git -b refactor -``` -* Build package -```bash -source /opt/intel//bin/setupvars.sh -cd ~/my_ros2_ws/src -colcon build --symlink-install -source ./install/local_setup.bash -``` - -## 3. Running the Demo -* Preparation - * Configure the Neural Compute Stick USB Driver - ```bash - cd ~/Downloads - cat < 97-usbboot.rules - SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - EOF - sudo cp 97-usbboot.rules /etc/udev/rules.d/ - sudo udevadm control --reload-rules - sudo udevadm trigger - sudo ldconfig - rm 97-usbboot.rules - ``` - * Download the optimized Intermediate Representation (IR) of model (execute once) - - ```bash - cd /opt/intel//deployment_tools/open_model_zoo/tools/downloader - sudo python3 downloader.py --name face-detection-adas-0001 --output_dir /opt/openvino_toolkit/models/face_detection/output - sudo python3 downloader.py --name age-gender-recognition-retail-0013 --output_dir /opt/openvino_toolkit/models/age-gender-recognition/output - sudo python3 downloader.py --name emotions-recognition-retail-0003 --output_dir /opt/openvino_toolkit/models/emotions-recognition/output - sudo python3 downloader.py --name head-pose-estimation-adas-0001 --output_dir /opt/openvino_toolkit/models/head-pose-estimation/output - sudo python3 downloader.py --name person-detection-retail-0013 --output_dir /opt/openvino_toolkit/models/person-detection/output - sudo python3 downloader.py --name person-reidentification-retail-0031 --output_dir /opt/openvino_toolkit/models/person-reidentification/output - sudo python3 downloader.py --name vehicle-license-plate-detection-barrier-0106 --output_dir /opt/openvino_toolkit/models/vehicle-license-plate-detection/output - sudo python3 downloader.py --name vehicle-attributes-recognition-barrier-0039 --output_dir /opt/openvino_toolkit/models/vehicle-attributes-recongnition/output - sudo python3 downloader.py --name license-plate-recognition-barrier-0001 --output_dir /opt/openvino_toolkit/models/license-plate-recognition/output - sudo python3 downloader.py --name semantic-segmentation-adas-0001 --output_dir /opt/openvino_toolkit/models/semantic-segmentation/output - sudo python3 downloader.py --name person-attributes-recognition-crossroad-0230 --output_dir /opt/openvino_toolkit/models/person-attributes/output - ``` - * copy label files (execute once) - ```bash - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/emotions-recognition/FP32/emotions-recognition-retail-0003.labels /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_detection/vehicle-license-plate-detection-barrier-0106.labels /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/intel/vehicle-license-plate-detection-barrier-0106/FP32 - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ - ``` - * If the model (tensorflow, caffe, MXNet, ONNX, Kaldi)need to be converted to intermediate representation (For example the model for object detection) - ```bash - sudo python3 downloader.py --name mobilenet-ssd --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output - cd /opt/intel//deployment_tools/model_optimizer - sudo python3 mo.py --input_model /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output/public/mobilenet-ssd/mobilenet-ssd.caffemodel --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output - ``` - * Before launch, check the parameter configuration in ros2_openvino_toolkit/sample/param/xxxx.yaml, make sure the paramter like model path, label path, inputs are right. - -* run face detection sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_people.launch.py -``` -* run face detection sample code input from Image. -```bash -ros2 launch dynamic_vino_sample pipeline_image.launch.py -``` -* run object segmentation sample code input from RealSenseCameraTopic. -```bash -ros2 launch dynamic_vino_sample pipeline_segmentation.launch.py -``` -* run object segmentation sample code input from Image. -```bash -ros2 launch dynamic_vino_sample pipeline_segmentation_image.launch.py -``` -* run vehicle detection sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_vehicle_detection.launch.py -``` -* run person attributes sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_person_attributes.launch.py -``` -* run person reidentification sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_reidentification.launch.py -``` - - - diff --git a/doc/getting_started_with_Foxy_Ubuntu18.04.md b/doc/getting_started_with_Foxy_Ubuntu18.04.md deleted file mode 100644 index fc73c22b..00000000 --- a/doc/getting_started_with_Foxy_Ubuntu18.04.md +++ /dev/null @@ -1,141 +0,0 @@ -# ROS2_FOXY_OpenVINO_Toolkit - -**NOTE:** -Below steps have been tested on **Ubuntu 18.04**. - -## 1. Install ROS2 Foxy from source code -* Before colcon build, update the cmake to 3.14+ -```bash -mkdir -p ~/cmake -cd ~/cmake -wget -t 3 -c https://www.cmake.org/files/v3.14/cmake-3.14.3.tar.gz -tar xf cmake-3.14.3.tar.gz -cd cmake-3.14.3 -./bootstrap --parallel=$(nproc --all) -make --jobs=$(nproc --all) -sudo make install -sudo ldconfig -```` -* Install ROS2 Foxy [(guide)](https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Development-Setup/) - -* Build ROS2 Foxy packages from source code -```bash -cd ~/ros2_foxy -colcon build --symlink-install -. ~/ros2_foxy/install/setup.bash -``` -## 2. Environment Setup -* Install OpenVINO™ Toolkit Version: 2020.3 [(guide)](https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html) -**Note:** Please use root privileges to run the installer when installing the core components. -* Install Intel® RealSense™ SDK 2.0 [(tag v2.30.0)](https://github.com/IntelRealSense/librealsense/tree/v2.30.0) - -## 3. Building and Installation -* Build demo code in OpenVINO toolkit -```bash - # root is required instead of sudo - source /opt/intel//bin/setupvars.sh - cd /opt/intel//deployment_tools/open_model_zoo/demos - source build_demos.sh -``` -* Install ROS2_OpenVINO packages -```bash -mkdir -p ~/my_ros2_ws/src -cd ~/my_ros2_ws/src -git clone https://github.com/intel/ros2_openvino_toolkit -git clone https://github.com/intel/ros2_object_msgs -git clone https://github.com/ros-perception/vision_opencv -b ros2 -git clone https://github.com/ros2/message_filters.git -git clone https://github.com/ros-perception/image_common.git -b dashing -git clone https://github.com/intel/ros2_intel_realsense.git -b refactor -``` -* Build package -```bash -source ~/ros2_foxy/install/local_setup.bash -source /opt/intel//bin/setupvars.sh -cd ~/my_ros2_ws/src -colcon build --symlink-install -source ./install/local_setup.bash -``` - -## 4. Running the Demo -* Preparation - * Configure the Neural Compute Stick USB Driver - ```bash - cd ~/Downloads - cat < 97-usbboot.rules - SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - EOF - sudo cp 97-usbboot.rules /etc/udev/rules.d/ - sudo udevadm control --reload-rules - sudo udevadm trigger - sudo ldconfig - rm 97-usbboot.rules - ``` - * Download the optimized Intermediate Representation (IR) of model (execute once) - - ```bash - cd /opt/intel//deployment_tools/open_model_zoo/tools/downloader - sudo python3 downloader.py --name face-detection-adas-0001 --output_dir /opt/openvino_toolkit/models/face_detection/output - sudo python3 downloader.py --name age-gender-recognition-retail-0013 --output_dir /opt/openvino_toolkit/models/age-gender-recognition/output - sudo python3 downloader.py --name emotions-recognition-retail-0003 --output_dir /opt/openvino_toolkit/models/emotions-recognition/output - sudo python3 downloader.py --name head-pose-estimation-adas-0001 --output_dir /opt/openvino_toolkit/models/head-pose-estimation/output - sudo python3 downloader.py --name person-detection-retail-0013 --output_dir /opt/openvino_toolkit/models/person-detection/output - sudo python3 downloader.py --name person-reidentification-retail-0031 --output_dir /opt/openvino_toolkit/models/person-reidentification/output - sudo python3 downloader.py --name vehicle-license-plate-detection-barrier-0106 --output_dir /opt/openvino_toolkit/models/vehicle-license-plate-detection/output - sudo python3 downloader.py --name vehicle-attributes-recognition-barrier-0039 --output_dir /opt/openvino_toolkit/models/vehicle-attributes-recongnition/output - sudo python3 downloader.py --name license-plate-recognition-barrier-0001 --output_dir /opt/openvino_toolkit/models/license-plate-recognition/output - sudo python3 downloader.py --name road-segmentation-adas-0001 --output_dir /opt/openvino_toolkit/models/road-segmentation/output - sudo python3 downloader.py --name person-attributes-recognition-crossroad-0230 --output_dir /opt/openvino_toolkit/models/person-attributes/output - ``` - * copy label files (execute once) - ```bash - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/emotions-recognition/FP32/emotions-recognition-retail-0003.labels /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_detection/vehicle-license-plate-detection-barrier-0106.labels /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/intel/vehicle-license-plate-detection-barrier-0106/FP32 - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ - ``` - * If the model (tensorflow, caffe, MXNet, ONNX, Kaldi)need to be converted to intermediate representation (For example the model for object detection) - ```bash - sudo python3 downloader.py --name mobilenet-ssd --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output - cd /opt/intel//deployment_tools/model_optimizer - sudo python3 mo.py --input_model /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output/public/mobilenet-ssd/mobilenet-ssd.caffemodel --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output - ``` - * Before launch, check the parameter configuration in ros2_openvino_toolkit/sample/param/xxxx.yaml, make sure the paramter like model path, label path, inputs are right. - -* run face detection sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_people.launch.py -``` -* run face detection sample code input from Image. -```bash -ros2 launch dynamic_vino_sample pipeline_image.launch.py -``` -* run object segmentation sample code input from RealSenseCameraTopic. -```bash -ros2 launch dynamic_vino_sample pipeline_segmentation.launch.py -``` -* run object segmentation sample code input from Image. -```bash -ros2 launch dynamic_vino_sample pipeline_segmentation_image.launch.py -``` -* run vehicle detection sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_vehicle_detection.launch.py -``` -* run person attributes sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_person_attributes.launch.py -``` -* run person reidentification sample code input from StandardCamera. -```bash -ros2 launch dynamic_vino_sample pipeline_reidentification.launch.py -``` - - - diff --git a/doc/getting_started_with_Foxy_Ubuntu20.04.md b/doc/getting_started_with_Foxy_Ubuntu20.04.md deleted file mode 100644 index cb576acc..00000000 --- a/doc/getting_started_with_Foxy_Ubuntu20.04.md +++ /dev/null @@ -1,117 +0,0 @@ -# ROS2_FOXY_OpenVINO_Toolkit - -**NOTE:** -Below steps have been tested on **Ubuntu 20.04**. - -## 1. Environment Setup -* Install ROS2 Foxy ([guide](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html)) -* Install Intel® OpenVINO™ Toolkit Version: 2021.3 ([guide](https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html)) -* Install Intel® RealSense ™ SDK ([guide](https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md)) - -## 2. Building and Installation -* Build demo code in OpenVINO toolkit -``` - # root is required instead of sudo - source /opt/intel//bin/setupvars.sh - cd /opt/intel//deployment_tools/open_model_zoo/demos - source build_demos.sh -``` -* Install ROS2_OpenVINO packages -``` -mkdir -p ~/my_ros2_ws/src -cd ~/my_ros2_ws/src -git clone https://github.com/intel/ros2_openvino_toolkit -b dev-ov.2021.3 -git clone https://github.com/intel/ros2_object_msgs -git clone https://github.com/intel/ros2_intel_realsense.git -b refactor -``` -* Build package -``` -source ~/ros2_foxy/install/local_setup.bash -source /opt/intel//bin/setupvars.sh -cd ~/my_ros2_ws/src -colcon build --symlink-install -source ./install/local_setup.bash -``` - -## 3. Running the Demo -* Preparation - * Configure the Neural Compute Stick USB Driver (if needed) -``` - cd ~/Downloads - cat < 97-usbboot.rules - SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - EOF - sudo cp 97-usbboot.rules /etc/udev/rules.d/ - sudo udevadm control --reload-rules - sudo udevadm trigger - sudo ldconfig - rm 97-usbboot.rules -``` - -* See all available models -``` -cd /opt/intel//deployment_tools/open_model_zoo/tools/downloader -sudo python3 downloader.py --print_all -``` - -* Download the optimized Intermediate Representation (IR) of model (execute once), for example: -``` -cd /opt/intel//deployment_tools/open_model_zoo/tools/downloader -sudo python3 downloader.py --name face-detection-adas-0001 --output_dir /opt/openvino_toolkit/models/face_detection/output -``` - -* copy label files (execute once) -``` - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/emotions-recognition/FP32/emotions-recognition-retail-0003.labels /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_detection/vehicle-license-plate-detection-barrier-0106.labels /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/intel/vehicle-license-plate-detection-barrier-0106/FP32 - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ -``` - -* If the model (tensorflow, caffe, MXNet, ONNX, Kaldi)need to be converted to intermediate representation (For example the model for object detection) -``` - sudo python3 downloader.py --name mobilenet-ssd --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output - cd /opt/intel//deployment_tools/model_optimizer - sudo python3 mo.py --input_model /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output/public/mobilenet-ssd/mobilenet-ssd.caffemodel --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output -``` - -* Before launch, check the parameter configuration in ros2_openvino_toolkit/sample/param/xxxx.yaml, make sure the paramter like model path, label path, inputs are right. -* run face detection sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_people.launch.py -``` -* run face detection sample code input from Image. -``` -ros2 launch dynamic_vino_sample pipeline_image.launch.py -``` -* run object segmentation sample code input from RealSenseCameraTopic. -``` -ros2 launch dynamic_vino_sample pipeline_segmentation.launch.py -``` -* run object segmentation sample code input from Image. -``` -ros2 launch dynamic_vino_sample pipeline_segmentation_image.launch.py -``` -* run vehicle detection sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_vehicle_detection.launch.py -``` -* run person attributes sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_person_attributes.launch.py -``` -* run person reidentification sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_reidentification.launch.py -``` - -# More Information -* ROS2 OpenVINO discription writen in Chinese: https://mp.weixin.qq.com/s/BgG3RGauv5pmHzV_hkVAdw - -###### *Any security issue should be reported using process at https://01.org/security* diff --git a/doc/getting_started_with_Galactic_Ubuntu20.04.md b/doc/getting_started_with_Galactic_Ubuntu20.04.md deleted file mode 100644 index 587eeccb..00000000 --- a/doc/getting_started_with_Galactic_Ubuntu20.04.md +++ /dev/null @@ -1,117 +0,0 @@ -# ROS2_GALACTIC_OpenVINO_Toolkit - -**NOTE:** -Below steps have been tested on **Ubuntu 20.04**. - -## 1. Environment Setup -* Install ROS2 Galactic ([guide](https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html)) -* Install Intel® OpenVINO™ Toolkit Version: 2021.4 ([guide](https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html)) or building by source code ([guide](https://github.com/openvinotoolkit/openvino/wiki/BuildingForLinux)) -* Install Intel® RealSense ™ SDK ([guide](https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md)) - -## 2. Building and Installation -* Build demo code in OpenVINO toolkit -``` - # root is required instead of sudo - source /opt/intel//bin/setupvars.sh - cd /opt/intel//deployment_tools/open_model_zoo/demos - source build_demos.sh -``` -* Install ROS2_OpenVINO packages -``` -mkdir -p ~/my_ros2_ws/src -cd ~/my_ros2_ws/src -git clone https://github.com/intel/ros2_openvino_toolkit -b dev-ov.2021.4 -git clone https://github.com/intel/ros2_object_msgs -git clone https://github.com/IntelRealSense/realsense-ros.git -b ros2 -``` -* Build package -``` -source /opt/ros/galactic/setup.bash -source /opt/intel//bin/setupvars.sh -cd ~/my_ros2_ws/src -colcon build --symlink-install -source ./install/local_setup.bash -``` - -## 3. Running the Demo -* Preparation - * Configure the Neural Compute Stick USB Driver (if needed) -``` - cd ~/Downloads - cat < 97-usbboot.rules - SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1" - EOF - sudo cp 97-usbboot.rules /etc/udev/rules.d/ - sudo udevadm control --reload-rules - sudo udevadm trigger - sudo ldconfig - rm 97-usbboot.rules -``` - -* See all available models -``` -cd /opt/intel//deployment_tools/open_model_zoo/tools/downloader -sudo python3 downloader.py --print_all -``` - -* Download the optimized Intermediate Representation (IR) of model (execute once), for example: -``` -cd /opt/intel//deployment_tools/open_model_zoo/tools/downloader -sudo python3 downloader.py --name face-detection-adas-0001 --output_dir /opt/openvino_toolkit/models/face_detection/output -``` - -* copy label files (execute once) -``` - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/emotions-recognition/FP32/emotions-recognition-retail-0003.labels /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/semantic-segmentation/output/FP16/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/object_detection/vehicle-license-plate-detection-barrier-0106.labels /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/intel/vehicle-license-plate-detection-barrier-0106/FP32 - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP32/ - sudo cp ~/my_ros2_ws/src/ros2_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/ -``` - -* If the model (tensorflow, caffe, MXNet, ONNX, Kaldi)need to be converted to intermediate representation (For example the model for object detection) -``` - sudo python3 downloader.py --name mobilenet-ssd --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output - cd /opt/intel//deployment_tools/model_optimizer - sudo python3 mo.py --input_model /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output/public/mobilenet-ssd/mobilenet-ssd.caffemodel --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output -``` - -* Before launch, check the parameter configuration in ros2_openvino_toolkit/sample/param/xxxx.yaml, make sure the paramter like model path, label path, inputs are right. -* run face detection sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_people.launch.py -``` -* run face detection sample code input from Image. -``` -ros2 launch dynamic_vino_sample pipeline_image.launch.py -``` -* run object segmentation sample code input from RealSenseCameraTopic. -``` -ros2 launch dynamic_vino_sample pipeline_segmentation.launch.py -``` -* run object segmentation sample code input from Image. -``` -ros2 launch dynamic_vino_sample pipeline_segmentation_image.launch.py -``` -* run vehicle detection sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_vehicle_detection.launch.py -``` -* run person attributes sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_person_attributes.launch.py -``` -* run person reidentification sample code input from StandardCamera. -``` -ros2 launch dynamic_vino_sample pipeline_reidentification.launch.py -``` - -# More Information -* ROS2 OpenVINO discription writen in Chinese: https://mp.weixin.qq.com/s/BgG3RGauv5pmHzV_hkVAdw - -###### *Any security issue should be reported using process at https://01.org/security* diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index a37b8408..00000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# ros2 openvino toolkit env master f1b1ca4d914186a1881b87f103be9c6e910c9d80 - -from osrf/ros:foxy-desktop - -MAINTAINER Cong Liu congliu0913@126.com - -SHELL ["/bin/bash", "-c"] - -# install openvino 2021.3 -# https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html -RUN apt update && apt install curl gnupg2 lsb-release -RUN curl -s https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021 |apt-key add - -RUN echo "deb https://apt.repos.intel.com/openvino/2021 all main" | tee /etc/apt/sources.list.d/intel-openvino-2021.list -RUN apt update -RUN apt-cache search openvino -RUN apt-get install -y intel-openvino-dev-ubuntu20-2021.3.394 -RUN ls -lh /opt/intel/openvino_2021 -RUN source /opt/intel/openvino_2021/bin/setupvars.sh - -# install librealsense2 -# https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md -RUN apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE -#RUN add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo focal main" -u -RUN echo 'deb https://librealsense.intel.com/Debian/apt-repo focal main' | sudo tee /etc/apt/sources.list.d/realsense-public.list -RUN apt-get update && apt-get install -y librealsense2-dev librealsense2 -RUN dpkg -l |grep realsense - -# build ros2 openvino toolkit -WORKDIR /root -RUN mkdir -p ros2_ws/src -WORKDIR /root/ros2_ws/src -RUN git clone https://github.com/intel/ros2_object_msgs.git -RUN git clone https://github.com/intel/ros2_openvino_toolkit.git -WORKDIR /root/ros2_ws -RUN source /opt/ros/foxy/setup.bash && source /opt/intel/openvino_2021/bin/setupvars.sh && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/age_gender_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/age_gender_detection_model.hpp index 1a5d5016..7ef53bfd 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/age_gender_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/age_gender_detection_model.hpp @@ -32,7 +32,7 @@ namespace Models class AgeGenderDetectionModel : public BaseModel { public: - AgeGenderDetectionModel(const std::string & model_loc, int batch_size = 1); + AgeGenderDetectionModel(const std::string& label_loc, const std::string& model_loc, int batch_size = 1); /** * @brief Get the input name. * @return Input name. diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/base_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/base_model.hpp index f3379670..b3e19a52 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/base_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/base_model.hpp @@ -63,7 +63,7 @@ namespace Models * @param[in] batch_size The number of batch size (default: 1) the network should have. * @return Whether the input device is successfully turned on. */ - BaseModel(const std::string &model_loc, int batch_size = 1); + BaseModel(const std::string& label_loc, const std::string& model_loc, int batch_size = 1); /** * @brief Get the maximum batch size of the model. @@ -124,13 +124,14 @@ namespace Models private: int max_batch_size_; std::string model_loc_; + std::string label_loc_; cv::Size frame_size_; }; class ObjectDetectionModel : public BaseModel { public: - ObjectDetectionModel(const std::string &model_loc, int batch_size = 1); + ObjectDetectionModel(const std::string& label_loc, const std::string& model_loc, int batch_size = 1); virtual bool fetchResults( const std::shared_ptr &engine, std::vector &result, diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/emotion_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/emotion_detection_model.hpp index edf9682c..de5d4dfb 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/emotion_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/emotion_detection_model.hpp @@ -32,7 +32,7 @@ namespace Models class EmotionDetectionModel : public BaseModel { public: - EmotionDetectionModel(const std::string & model_loc, int batch_size = 1); + EmotionDetectionModel(const std::string& label_loc, const std::string& model_loc, int batch_size = 1); /** * @brief Get the name of this detection model. diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/face_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/face_detection_model.hpp index f7c83ac6..11c7efae 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/face_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/face_detection_model.hpp @@ -32,7 +32,7 @@ namespace Models class FaceDetectionModel : public ObjectDetectionModel { public: - FaceDetectionModel(const std::string & model_loc, int batch_size = 1); + FaceDetectionModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); //void checkLayerProperty(const InferenceEngine::CNNNetReader::Ptr &) override; /** * @brief Get the name of this detection model. diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/face_reidentification_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/face_reidentification_model.hpp index 20d88f2b..1939cf05 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/face_reidentification_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/face_reidentification_model.hpp @@ -29,7 +29,7 @@ namespace Models class FaceReidentificationModel : public BaseModel { public: - FaceReidentificationModel(const std::string & model_loc, int batch_size = 1); + FaceReidentificationModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); inline const std::string getInputName() {return input_;} inline const std::string getOutputName() {return output_;} /** diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/head_pose_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/head_pose_detection_model.hpp index 1b0bc1b1..5afce9b3 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/head_pose_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/head_pose_detection_model.hpp @@ -32,7 +32,7 @@ namespace Models class HeadPoseDetectionModel : public BaseModel { public: - HeadPoseDetectionModel(const std::string & model_loc, int batch_size = 1); + HeadPoseDetectionModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); /** * @brief Get the output angle roll. diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/landmarks_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/landmarks_detection_model.hpp index a1434850..7bbb51e5 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/landmarks_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/landmarks_detection_model.hpp @@ -29,7 +29,7 @@ namespace Models class LandmarksDetectionModel : public BaseModel { public: - LandmarksDetectionModel(const std::string & model_loc, int batch_size = 1); + LandmarksDetectionModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); inline const std::string getInputName() {return input_;} inline const std::string getOutputName() {return output_;} /** diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/license_plate_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/license_plate_detection_model.hpp index 0074f764..9357160a 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/license_plate_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/license_plate_detection_model.hpp @@ -29,7 +29,7 @@ namespace Models class LicensePlateDetectionModel : public BaseModel { public: - LicensePlateDetectionModel(const std::string & model_loc, int batch_size = 1); + LicensePlateDetectionModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); inline const std::string getInputName() {return input_;} inline const std::string getSeqInputName() {return seq_input_;} inline const std::string getOutputName() {return output_;} diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_ssd_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_ssd_model.hpp index cca96f77..76bb6354 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_ssd_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_ssd_model.hpp @@ -32,7 +32,7 @@ class ObjectDetectionSSDModel : public ObjectDetectionModel using Result = dynamic_vino_lib::ObjectDetectionResult; public: - ObjectDetectionSSDModel(const std::string & model_loc, int batch_size = 1); + ObjectDetectionSSDModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); bool fetchResults( const std::shared_ptr & engine, diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_yolov2_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_yolov2_model.hpp index 25f2b982..efbe17e9 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_yolov2_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/object_detection_yolov2_model.hpp @@ -32,7 +32,7 @@ class ObjectDetectionYolov2Model : public ObjectDetectionModel using Result = dynamic_vino_lib::ObjectDetectionResult; public: - ObjectDetectionYolov2Model(const std::string & model_loc, int batch_size = 1); + ObjectDetectionYolov2Model(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); bool fetchResults( const std::shared_ptr & engine, diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/object_segmentation_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/object_segmentation_model.hpp index c17bba8f..af047bcc 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/object_segmentation_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/object_segmentation_model.hpp @@ -28,7 +28,7 @@ namespace Models class ObjectSegmentationModel : public BaseModel { public: - ObjectSegmentationModel(const std::string & model_loc, int batch_size = 1); + ObjectSegmentationModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); inline int getMaxProposalCount() const { return max_proposal_count_; diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/person_attribs_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/person_attribs_detection_model.hpp index 0389f2cf..d05e67a6 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/person_attribs_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/person_attribs_detection_model.hpp @@ -29,7 +29,7 @@ namespace Models class PersonAttribsDetectionModel : public BaseModel { public: - PersonAttribsDetectionModel(const std::string & model_loc, int batch_size = 1); + PersonAttribsDetectionModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); //inline const std::string getInputName() {return input_;} //inline const std::string getOutputName() {return output_;} /** diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/person_reidentification_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/person_reidentification_model.hpp index 57be91ba..41ff85c7 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/person_reidentification_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/person_reidentification_model.hpp @@ -29,7 +29,7 @@ namespace Models class PersonReidentificationModel : public BaseModel { public: - PersonReidentificationModel(const std::string & model_loc, int batch_size = 1); + PersonReidentificationModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); inline const std::string getInputName() {return input_;} inline const std::string getOutputName() {return output_;} /** diff --git a/dynamic_vino_lib/include/dynamic_vino_lib/models/vehicle_attribs_detection_model.hpp b/dynamic_vino_lib/include/dynamic_vino_lib/models/vehicle_attribs_detection_model.hpp index 38b452f6..9ed5acdc 100644 --- a/dynamic_vino_lib/include/dynamic_vino_lib/models/vehicle_attribs_detection_model.hpp +++ b/dynamic_vino_lib/include/dynamic_vino_lib/models/vehicle_attribs_detection_model.hpp @@ -29,7 +29,7 @@ namespace Models class VehicleAttribsDetectionModel : public BaseModel { public: - VehicleAttribsDetectionModel(const std::string & model_loc, int batch_size = 1); + VehicleAttribsDetectionModel(const std::string& label_loc, const std::string & model_loc, int batch_size = 1); inline const std::string getInputName() {return input_;} inline const std::string getColorOutputName() {return color_output_;} inline const std::string getTypeOutputName() {return type_output_;} diff --git a/dynamic_vino_lib/src/models/age_gender_detection_model.cpp b/dynamic_vino_lib/src/models/age_gender_detection_model.cpp index 480f6a06..fa7e6f2d 100644 --- a/dynamic_vino_lib/src/models/age_gender_detection_model.cpp +++ b/dynamic_vino_lib/src/models/age_gender_detection_model.cpp @@ -24,9 +24,10 @@ // Validated Age Gender Classification Network Models::AgeGenderDetectionModel::AgeGenderDetectionModel( + const std::string & label_loc, const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) +: BaseModel(label_loc,model_loc, max_batch_size) { } bool Models::AgeGenderDetectionModel::updateLayerProperty( diff --git a/dynamic_vino_lib/src/models/base_model.cpp b/dynamic_vino_lib/src/models/base_model.cpp index 2402fb1f..f9ddeaa6 100644 --- a/dynamic_vino_lib/src/models/base_model.cpp +++ b/dynamic_vino_lib/src/models/base_model.cpp @@ -29,8 +29,9 @@ // Validated Base Network Models::BaseModel::BaseModel( - const std::string & model_loc, int max_batch_size) -: model_loc_(model_loc), + const std::string& label_loc, const std::string& model_loc, int max_batch_size) +: label_loc_(label_loc), + model_loc_(model_loc), max_batch_size_(max_batch_size), ModelAttribute(model_loc) { @@ -43,7 +44,8 @@ Models::BaseModel::BaseModel( void Models::BaseModel::modelInit() { - slog::info << "Loading network files" << slog::endl; + slog::info << "Loading network files" << model_loc_ << slog::endl; + slog::info << label_loc_ << slog::endl; // Read network model ///net_reader_->ReadNetwork(model_loc_); net_reader_ = engine.ReadNetwork(model_loc_); @@ -54,8 +56,9 @@ void Models::BaseModel::modelInit() ///std::string bin_file_name = raw_name + ".bin"; ///net_reader_->ReadWeights(bin_file_name); // Read labels (if any) - std::string label_file_name = raw_name + ".labels"; - loadLabelsFromFile(label_file_name); + std::string label_file_name = label_loc_.substr(0, last_index); + //std::string label_file_name = raw_name + ".labels"; + loadLabelsFromFile(label_loc_); // Set batch size to given max_batch_size_ slog::info << "Batch size is set to " << max_batch_size_ << slog::endl; @@ -87,6 +90,7 @@ bool Models::BaseModel::updateLayerProperty( #endif Models::ObjectDetectionModel::ObjectDetectionModel( - const std::string & model_loc, + const std::string& label_loc, + const std::string& model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) {} +: BaseModel(label_loc, model_loc, max_batch_size) {} diff --git a/dynamic_vino_lib/src/models/emotion_detection_model.cpp b/dynamic_vino_lib/src/models/emotion_detection_model.cpp index ef43ea1f..0c4f78e0 100644 --- a/dynamic_vino_lib/src/models/emotion_detection_model.cpp +++ b/dynamic_vino_lib/src/models/emotion_detection_model.cpp @@ -23,8 +23,8 @@ // Validated Emotions Detection Network Models::EmotionDetectionModel::EmotionDetectionModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) { } diff --git a/dynamic_vino_lib/src/models/face_detection_model.cpp b/dynamic_vino_lib/src/models/face_detection_model.cpp index 754491a8..c673b6d7 100644 --- a/dynamic_vino_lib/src/models/face_detection_model.cpp +++ b/dynamic_vino_lib/src/models/face_detection_model.cpp @@ -24,8 +24,8 @@ // Validated Face Detection Network Models::FaceDetectionModel::FaceDetectionModel( - const std::string & model_loc, int max_batch_size) -: ObjectDetectionModel(model_loc, max_batch_size) + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: ObjectDetectionModel(label_loc, model_loc, max_batch_size) { } diff --git a/dynamic_vino_lib/src/models/face_reidentification_model.cpp b/dynamic_vino_lib/src/models/face_reidentification_model.cpp index 94eafa54..a5d4572c 100644 --- a/dynamic_vino_lib/src/models/face_reidentification_model.cpp +++ b/dynamic_vino_lib/src/models/face_reidentification_model.cpp @@ -21,8 +21,8 @@ #include "dynamic_vino_lib/slog.hpp" // Validated Face Reidentification Network Models::FaceReidentificationModel::FaceReidentificationModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) {} + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) {} void Models::FaceReidentificationModel::setLayerProperty( InferenceEngine::CNNNetwork& net_reader) diff --git a/dynamic_vino_lib/src/models/head_pose_detection_model.cpp b/dynamic_vino_lib/src/models/head_pose_detection_model.cpp index 8dad21a2..faaa6dcf 100644 --- a/dynamic_vino_lib/src/models/head_pose_detection_model.cpp +++ b/dynamic_vino_lib/src/models/head_pose_detection_model.cpp @@ -25,8 +25,8 @@ // Validated Head Pose Network Models::HeadPoseDetectionModel::HeadPoseDetectionModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) { } diff --git a/dynamic_vino_lib/src/models/landmarks_detection_model.cpp b/dynamic_vino_lib/src/models/landmarks_detection_model.cpp index 148559c2..42aa5319 100644 --- a/dynamic_vino_lib/src/models/landmarks_detection_model.cpp +++ b/dynamic_vino_lib/src/models/landmarks_detection_model.cpp @@ -21,8 +21,8 @@ #include "dynamic_vino_lib/slog.hpp" // Validated Landmarks Detection Network Models::LandmarksDetectionModel::LandmarksDetectionModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) {} + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) {} void Models::LandmarksDetectionModel::setLayerProperty( InferenceEngine::CNNNetwork& net_reader) diff --git a/dynamic_vino_lib/src/models/license_plate_detection_model.cpp b/dynamic_vino_lib/src/models/license_plate_detection_model.cpp index 896d35f3..171764f5 100644 --- a/dynamic_vino_lib/src/models/license_plate_detection_model.cpp +++ b/dynamic_vino_lib/src/models/license_plate_detection_model.cpp @@ -21,8 +21,8 @@ #include "dynamic_vino_lib/slog.hpp" // Validated Vehicle Attributes Detection Network Models::LicensePlateDetectionModel::LicensePlateDetectionModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) {} + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) {} bool Models::LicensePlateDetectionModel::updateLayerProperty( InferenceEngine::CNNNetwork& net_reader) diff --git a/dynamic_vino_lib/src/models/object_detection_ssd_model.cpp b/dynamic_vino_lib/src/models/object_detection_ssd_model.cpp index 949deeba..d0996fdc 100644 --- a/dynamic_vino_lib/src/models/object_detection_ssd_model.cpp +++ b/dynamic_vino_lib/src/models/object_detection_ssd_model.cpp @@ -27,8 +27,8 @@ // Validated Object Detection Network Models::ObjectDetectionSSDModel::ObjectDetectionSSDModel( - const std::string & model_loc, int max_batch_size) -: ObjectDetectionModel(model_loc, max_batch_size) + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: ObjectDetectionModel(label_loc, model_loc, max_batch_size) { slog::debug << "TESTING: in ObjectDetectionSSDModel" << slog::endl; //addCandidatedAttr(std::make_shared()); diff --git a/dynamic_vino_lib/src/models/object_detection_yolov2_model.cpp b/dynamic_vino_lib/src/models/object_detection_yolov2_model.cpp index 1c86020e..df1388ab 100644 --- a/dynamic_vino_lib/src/models/object_detection_yolov2_model.cpp +++ b/dynamic_vino_lib/src/models/object_detection_yolov2_model.cpp @@ -28,8 +28,8 @@ // Validated Object Detection Network Models::ObjectDetectionYolov2Model::ObjectDetectionYolov2Model( - const std::string & model_loc, int max_batch_size) -: ObjectDetectionModel(model_loc, max_batch_size) + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: ObjectDetectionModel(label_loc, model_loc, max_batch_size) { } diff --git a/dynamic_vino_lib/src/models/object_segmentation_model.cpp b/dynamic_vino_lib/src/models/object_segmentation_model.cpp index c64baffa..ab4797f0 100644 --- a/dynamic_vino_lib/src/models/object_segmentation_model.cpp +++ b/dynamic_vino_lib/src/models/object_segmentation_model.cpp @@ -24,9 +24,10 @@ #include "dynamic_vino_lib/engines/engine.hpp" // Validated Object Segmentation Network Models::ObjectSegmentationModel::ObjectSegmentationModel( - const std::string &model_loc, + const std::string & label_loc, + const std::string & model_loc, int max_batch_size) - : BaseModel(model_loc, max_batch_size) + : BaseModel(label_loc, model_loc, max_batch_size) { } diff --git a/dynamic_vino_lib/src/models/person_attribs_detection_model.cpp b/dynamic_vino_lib/src/models/person_attribs_detection_model.cpp index 355b2857..c12e4071 100644 --- a/dynamic_vino_lib/src/models/person_attribs_detection_model.cpp +++ b/dynamic_vino_lib/src/models/person_attribs_detection_model.cpp @@ -21,8 +21,8 @@ #include "dynamic_vino_lib/slog.hpp" // Validated Person Attributes Detection Network Models::PersonAttribsDetectionModel::PersonAttribsDetectionModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) {} + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) {} bool Models::PersonAttribsDetectionModel::updateLayerProperty( InferenceEngine::CNNNetwork& net_reader) diff --git a/dynamic_vino_lib/src/models/person_reidentification_model.cpp b/dynamic_vino_lib/src/models/person_reidentification_model.cpp index 7ae2410e..e9e2834c 100644 --- a/dynamic_vino_lib/src/models/person_reidentification_model.cpp +++ b/dynamic_vino_lib/src/models/person_reidentification_model.cpp @@ -21,8 +21,8 @@ #include "dynamic_vino_lib/slog.hpp" // Validated Person Reidentification Network Models::PersonReidentificationModel::PersonReidentificationModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) {} + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) {} /* void Models::PersonReidentificationModel::setLayerProperty( InferenceEngine::CNNNetReader::Ptr net_reader) diff --git a/dynamic_vino_lib/src/models/vehicle_attribs_detection_model.cpp b/dynamic_vino_lib/src/models/vehicle_attribs_detection_model.cpp index 1cdf68b8..0637f3f6 100644 --- a/dynamic_vino_lib/src/models/vehicle_attribs_detection_model.cpp +++ b/dynamic_vino_lib/src/models/vehicle_attribs_detection_model.cpp @@ -21,8 +21,8 @@ #include "dynamic_vino_lib/slog.hpp" // Validated Vehicle Attributes Detection Network Models::VehicleAttribsDetectionModel::VehicleAttribsDetectionModel( - const std::string & model_loc, int max_batch_size) -: BaseModel(model_loc, max_batch_size) {} + const std::string & label_loc, const std::string & model_loc, int max_batch_size) +: BaseModel(label_loc, model_loc, max_batch_size) {} bool Models::VehicleAttribsDetectionModel::updateLayerProperty( InferenceEngine::CNNNetwork& net_reader) diff --git a/dynamic_vino_lib/src/pipeline_manager.cpp b/dynamic_vino_lib/src/pipeline_manager.cpp index 526a0020..5d348255 100644 --- a/dynamic_vino_lib/src/pipeline_manager.cpp +++ b/dynamic_vino_lib/src/pipeline_manager.cpp @@ -248,7 +248,7 @@ PipelineManager::createFaceDetection( std::shared_ptr PipelineManager::createAgeGenderRecognition(const Params::ParamManager::InferenceRawData & param) { - auto model = std::make_shared(param.model, param.batch); + auto model = std::make_shared(param.label, param.model, param.batch); model->modelInit(); auto engine = engine_manager_.createEngine(param.engine, model); auto infer = std::make_shared(); @@ -261,7 +261,7 @@ PipelineManager::createAgeGenderRecognition(const Params::ParamManager::Inferenc std::shared_ptr PipelineManager::createEmotionRecognition(const Params::ParamManager::InferenceRawData & param) { - auto model = std::make_shared(param.model, param.batch); + auto model = std::make_shared(param.label, param.model, param.batch); model->modelInit(); auto engine = engine_manager_.createEngine(param.engine, model); auto infer = std::make_shared(); @@ -274,7 +274,7 @@ PipelineManager::createEmotionRecognition(const Params::ParamManager::InferenceR std::shared_ptr PipelineManager::createHeadPoseEstimation(const Params::ParamManager::InferenceRawData & param) { - auto model = std::make_shared(param.model, param.batch); + auto model = std::make_shared(param.label, param.model, param.batch); model->modelInit(); auto engine = engine_manager_.createEngine(param.engine, model); auto infer = std::make_shared(); @@ -294,11 +294,11 @@ PipelineManager::createObjectDetection( slog::debug << "for test in createObjectDetection()" << slog::endl; if (infer.model_type == kInferTpye_ObjectDetectionTypeSSD) { object_detection_model = - std::make_shared(infer.model, infer.batch); + std::make_shared(infer.label, infer.model, infer.batch); } if (infer.model_type == kInferTpye_ObjectDetectionTypeYolov2) { object_detection_model = - std::make_shared(infer.model, infer.batch); + std::make_shared(infer.label, infer.model, infer.batch); } slog::debug << "for test in createObjectDetection(), Created SSDModel" << slog::endl; @@ -319,7 +319,7 @@ std::shared_ptr PipelineManager::createObjectSegmentation(const Params::ParamManager::InferenceRawData & infer) { auto model = - std::make_shared(infer.model, infer.batch); + std::make_shared(infer.label, infer.model, infer.batch); model->modelInit(); slog::info << "Segmentation model initialized." << slog::endl; auto engine = engine_manager_.createEngine(infer.engine, model); @@ -341,7 +341,7 @@ PipelineManager::createPersonReidentification( std::shared_ptr reidentification_inference_ptr; slog::debug << "for test in createPersonReidentification()"<(infer.model, infer.batch); + std::make_shared(infer.label, infer.model, infer.batch); person_reidentification_model->modelInit(); slog::info << "Reidentification model initialized" << slog::endl; auto person_reidentification_engine = engine_manager_.createEngine(infer.engine, person_reidentification_model); @@ -360,7 +360,7 @@ PipelineManager::createVehicleAttribsDetection( const Params::ParamManager::InferenceRawData & infer) { auto model = - std::make_shared(infer.model, infer.batch); + std::make_shared(infer.label, infer.model, infer.batch); model->modelInit(); auto engine = engine_manager_.createEngine(infer.engine, model); auto vehicle_attribs_ptr = @@ -376,7 +376,7 @@ PipelineManager::createLicensePlateDetection( const Params::ParamManager::InferenceRawData & infer) { auto model = - std::make_shared(infer.model, infer.batch); + std::make_shared(infer.label, infer.model, infer.batch); model->modelInit(); auto engine = engine_manager_.createEngine(infer.engine, model); auto license_plate_ptr = @@ -392,7 +392,7 @@ PipelineManager::createPersonAttribsDetection( const Params::ParamManager::InferenceRawData & infer) { auto model = - std::make_shared(infer.model, infer.batch); + std::make_shared(infer.label, infer.model, infer.batch); slog::debug << "for test in createPersonAttributesDetection()"<modelInit(); auto engine = engine_manager_.createEngine(infer.engine, model); diff --git a/sample/launch/__pycache__/pipeline_people.launch.cpython-38.pyc b/sample/launch/__pycache__/pipeline_people.launch.cpython-38.pyc new file mode 100644 index 00000000..8848b7fb Binary files /dev/null and b/sample/launch/__pycache__/pipeline_people.launch.cpython-38.pyc differ diff --git a/sample/launch/pipeline_composite_object_topic.launch.py b/sample/launch/pipeline_composite_object_topic.launch.py index 3a572680..5184448f 100644 --- a/sample/launch/pipeline_composite_object_topic.launch.py +++ b/sample/launch/pipeline_composite_object_topic.launch.py @@ -11,7 +11,7 @@ def generate_launch_description(): node_name='vision_pipeline', node_namespace='', package='rclcpp_components', - node_executable='component_container', + executable='component_container', composable_node_descriptions=[ ComposableNode( package='realsense_ros', diff --git a/sample/launch/pipeline_face_reidentification.launch.py b/sample/launch/pipeline_face_reidentification.launch.py index aed6424c..758cc881 100644 --- a/sample/launch/pipeline_face_reidentification.launch.py +++ b/sample/launch/pipeline_face_reidentification.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_face_reidentification.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_face_reidentification.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_face_reidentification.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/people/detected_landmarks', '/ros2_openvino_toolkit/detected_landmarks'), @@ -41,6 +47,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_image.launch.py b/sample/launch/pipeline_image.launch.py index 77e0fca0..8b272141 100644 --- a/sample/launch/pipeline_image.launch.py +++ b/sample/launch/pipeline_image.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_image.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_image.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_image.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/people/faces', '/ros2_openvino_toolkit/face_detection'), @@ -45,6 +51,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_object.launch.py b/sample/launch/pipeline_object.launch.py index 96e3ba7f..fd9aaafb 100644 --- a/sample/launch/pipeline_object.launch.py +++ b/sample/launch/pipeline_object.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_object.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_object.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_object.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/object/detected_objects', '/ros2_openvino_toolkit/detected_objects'), diff --git a/sample/launch/pipeline_object_topic.launch.py b/sample/launch/pipeline_object_topic.launch.py index a33bde0b..cac7cc28 100644 --- a/sample/launch/pipeline_object_topic.launch.py +++ b/sample/launch/pipeline_object_topic.launch.py @@ -20,13 +20,17 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_object_topic.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_object_topic.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_object_topic.yaml')), # Realsense # NOTE: Split realsense_node launching from OpenVINO package, which # will be launched by RDK launching file or manually. @@ -36,8 +40,10 @@ def generate_launch_description(): # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/object/detected_objects', '/ros2_openvino_toolkit/detected_objects'), @@ -46,6 +52,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_object_yolo.launch.py b/sample/launch/pipeline_object_yolo.launch.py index 7bb4685e..a4bbd01d 100644 --- a/sample/launch/pipeline_object_yolo.launch.py +++ b/sample/launch/pipeline_object_yolo.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_object_yolo.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_object_yolo.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_object_yolo.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/object/detected_objects', '/ros2_openvino_toolkit/detected_objects'), @@ -40,6 +46,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_object_yolo_topic.launch.py b/sample/launch/pipeline_object_yolo_topic.launch.py index 2d00a4bf..7f6c0d22 100644 --- a/sample/launch/pipeline_object_yolo_topic.launch.py +++ b/sample/launch/pipeline_object_yolo_topic.launch.py @@ -20,13 +20,17 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_object_yolo_topic.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_object_yolo_topic.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_object_yolo_topic.yaml')), # Realsense # NOTE: Split realsense_node launching from OpenVINO package, which # will be launched by RDK launching file or manually. @@ -36,8 +40,10 @@ def generate_launch_description(): # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/object/detected_objects', @@ -47,6 +53,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_people.launch.py b/sample/launch/pipeline_people.launch.py index 7cd67360..3c10c216 100644 --- a/sample/launch/pipeline_people.launch.py +++ b/sample/launch/pipeline_people.launch.py @@ -20,17 +20,25 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch + def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_people.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_people.yaml') + default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_people.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/people/detected_objects', '/ros2_openvino_toolkit/face_detection'), @@ -45,6 +53,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_people_ip.launch.py b/sample/launch/pipeline_people_ip.launch.py index 78b6e1f5..2cd41a3b 100644 --- a/sample/launch/pipeline_people_ip.launch.py +++ b/sample/launch/pipeline_people_ip.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_people_ip.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_people_ip.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_people_ip.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/people/detected_objects', '/ros2_openvino_toolkit/face_detection'), @@ -45,6 +51,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_person_attributes.launch.py b/sample/launch/pipeline_person_attributes.launch.py index a5ef4015..ce6d6d50 100644 --- a/sample/launch/pipeline_person_attributes.launch.py +++ b/sample/launch/pipeline_person_attributes.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_person_attributes.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_person_attributes.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_person_attributes.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/object/detected_objects', '/ros2_openvino_toolkit/detected_objects'), @@ -40,6 +46,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_reidentification.launch.py b/sample/launch/pipeline_reidentification.launch.py index 2572729d..630aa61c 100644 --- a/sample/launch/pipeline_reidentification.launch.py +++ b/sample/launch/pipeline_reidentification.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_reidentification.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_reidentification.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_reidentification.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/object/detected_objects', '/ros2_openvino_toolkit/detected_objects'), @@ -41,6 +47,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_segmentation.launch.py b/sample/launch/pipeline_segmentation.launch.py index 106978e5..9b511f6a 100644 --- a/sample/launch/pipeline_segmentation.launch.py +++ b/sample/launch/pipeline_segmentation.launch.py @@ -20,13 +20,17 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_segmentation_image.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_segmentation.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_segmentation.yaml')), # Realsense # NOTE: Split realsense_node launching from OpenVINO package, which # will be launched by RDK launching file or manually. @@ -36,8 +40,10 @@ def generate_launch_description(): # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', @@ -47,6 +53,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_segmentation_image.launch.py b/sample/launch/pipeline_segmentation_image.launch.py new file mode 100644 index 00000000..bf460736 --- /dev/null +++ b/sample/launch/pipeline_segmentation_image.launch.py @@ -0,0 +1,59 @@ +# Copyright 2018 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Launch face detection and rviz.""" + +import os + +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +import launch_ros.actions + +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch + +def generate_launch_description(): + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_segmentation_image.yaml') + default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', + 'rviz/default.rviz') + return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_segmentation_image.yaml')), + # Realsense + # NOTE: Split realsense_node launching from OpenVINO package, which + # will be launched by RDK launching file or manually. + #launch_ros.actions.Node( + # package='realsense_ros2_camera', node_executable='realsense_ros2_camera', + # output='screen'), + + # Openvino detection + launch_ros.actions.Node( + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], + remappings=[ + ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('/openvino_toolkit/segmentation/segmented_obejcts', + '/ros2_openvino_toolkit/segmented_obejcts'), + ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], + output='screen'), + + # Rviz + launch_ros.actions.Node( + package='rviz2', + executable='rviz2', output='screen', + arguments=['--display-config', default_rviz]), + ]) diff --git a/sample/launch/pipeline_vehicle_detection.launch.py b/sample/launch/pipeline_vehicle_detection.launch.py index 050bbf86..56cb722d 100644 --- a/sample/launch/pipeline_vehicle_detection.launch.py +++ b/sample/launch/pipeline_vehicle_detection.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_vehicle_detection.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_vehicle_detection.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_vehicle_detection.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/object/detected_license_plates', '/ros2_openvino_toolkit/detected_license_plates'), @@ -41,6 +47,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/launch/pipeline_video.launch.py b/sample/launch/pipeline_video.launch.py index e0a15d7a..a232fee9 100644 --- a/sample/launch/pipeline_video.launch.py +++ b/sample/launch/pipeline_video.launch.py @@ -20,17 +20,23 @@ from launch import LaunchDescription import launch_ros.actions +from launch.substitutions import LaunchConfiguration, PythonExpression +import launch def generate_launch_description(): - default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', - 'pipeline_video.yaml') + #default_yaml = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param', + #'pipeline_video.yaml') default_rviz = os.path.join(get_package_share_directory('dynamic_vino_sample'), 'launch', 'rviz/default.rviz') return LaunchDescription([ + launch.actions.DeclareLaunchArgument(name='yaml_path', default_value = + os.path.join(get_package_share_directory('dynamic_vino_sample'), 'param','pipeline_video.yaml')), # Openvino detection launch_ros.actions.Node( - package='dynamic_vino_sample', node_executable='pipeline_with_params', - arguments=['-config', default_yaml], + package='dynamic_vino_sample', + executable='pipeline_with_params', + #arguments=['-config', default_yaml], + arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), @@ -39,6 +45,7 @@ def generate_launch_description(): # Rviz launch_ros.actions.Node( - package='rviz2', node_executable='rviz2', output='screen', + package='rviz2', + executable='rviz2', output='screen', arguments=['--display-config', default_rviz]), ]) diff --git a/sample/param/.pipeline_segmentation.yaml.swp b/sample/param/.pipeline_segmentation.yaml.swp new file mode 100644 index 00000000..d3819bf9 Binary files /dev/null and b/sample/param/.pipeline_segmentation.yaml.swp differ diff --git a/sample/param/pipeline_composite_object_topic.yaml b/sample/param/pipeline_composite_object_topic.yaml index da9327a0..58e6bbf7 100644 --- a/sample/param/pipeline_composite_object_topic.yaml +++ b/sample/param/pipeline_composite_object_topic.yaml @@ -3,8 +3,8 @@ Pipelines: inputs: [RealSenseCameraTopic] infers: - name: ObjectDetection - model: /opt/openvino_toolkit/models/object_detection/mobilenet-ssd/caffe/output/FP16/mobilenet-ssd.xml - engine: MYRIAD + model: /opt/openvino_toolkit/models/public/ssd_mobilenet_v2_coco/FP16/ssd_mobilenet_v2_coco.xml + engine: CPU #MYRIAD label: to/be/set/xxx.labels batch: 1 confidence_threshold: 0.5 diff --git a/sample/param/pipeline_face_reidentification.yaml b/sample/param/pipeline_face_reidentification.yaml index dba0ba56..08c5bef2 100644 --- a/sample/param/pipeline_face_reidentification.yaml +++ b/sample/param/pipeline_face_reidentification.yaml @@ -5,7 +5,7 @@ Pipelines: - name: FaceDetection model: /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.xml engine: CPU - label: /opt/intel/openvino/deployment_tools/tools/model_downloader/Transportation/object_detection/face/pruned_mobilenet_reduced_ssd_shared_weights/dldt/face-detection-adas-0001.labels + label: /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.labels batch: 1 confidence_threshold: 0.5 enable_roi_constraint: true # set enable_roi_constraint to false if you don't want to make the inferred ROI (region of interest) constrained into the camera frame diff --git a/sample/param/pipeline_image.yaml b/sample/param/pipeline_image.yaml index b762a1d3..c2d1cb86 100644 --- a/sample/param/pipeline_image.yaml +++ b/sample/param/pipeline_image.yaml @@ -1,7 +1,7 @@ Pipelines: - name: people inputs: [Image] - input_path: /opt/openvino_toolkit/ros2_openvino_toolkit/data/images/team.jpg + input_path: /opt/openvino_toolkit/ros2_openvino_toolkit/data/images/sample_faces.jpg infers: - name: FaceDetection model: /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.xml diff --git a/sample/param/pipeline_object.yaml b/sample/param/pipeline_object.yaml index c02cb87e..7c0f97d7 100644 --- a/sample/param/pipeline_object.yaml +++ b/sample/param/pipeline_object.yaml @@ -3,7 +3,7 @@ Pipelines: inputs: [StandardCamera] infers: - name: ObjectDetection - model: /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/caffe/output/FP16/mobilenet-ssd.xml + model: /opt/openvino_toolkit/models/public/ssd_mobilenet_v2_coco/FP16/ssd_mobilenet_v2_coco.xml engine: CPU label: to/be/set/xxx.labels batch: 1 diff --git a/sample/param/pipeline_object_topic.yaml b/sample/param/pipeline_object_topic.yaml index 67ec2a90..39c9cd34 100644 --- a/sample/param/pipeline_object_topic.yaml +++ b/sample/param/pipeline_object_topic.yaml @@ -1,17 +1,17 @@ Pipelines: - name: object - inputs: [RealSenseCameraTopic] + inputs: [StandardCamera] #[RealSenseCameraTopic] infers: - name: ObjectDetection - model: /opt/openvino_toolkit/models/object_detection/mobilenet-ssd/caffe/output/FP16/mobilenet-ssd.xml - engine: MYRIAD + model: /opt/openvino_toolkit/models/public/ssd_mobilenet_v2_coco/FP16/ssd_mobilenet_v2_coco.xml + engine: CPU #MYRIAD label: to/be/set/xxx.labels batch: 1 confidence_threshold: 0.5 enable_roi_constraint: true # set enable_roi_constraint to false if you don't want to make the inferred ROI (region of interest) constrained into the camera frame outputs: [ImageWindow, RosTopic, RViz] connects: - - left: RealSenseCameraTopic + - left: StandardCamera #RealSenseCameraTopic right: [ObjectDetection] - left: ObjectDetection right: [ImageWindow] diff --git a/sample/param/pipeline_object_yolo.yaml b/sample/param/pipeline_object_yolo.yaml index 11c1de08..1c629dee 100644 --- a/sample/param/pipeline_object_yolo.yaml +++ b/sample/param/pipeline_object_yolo.yaml @@ -3,10 +3,10 @@ Pipelines: inputs: [RealSenseCamera] infers: - name: ObjectDetection - model: /opt/openvino_toolkit/models/object_detection/YOLOv2-voc/tf/output/FP16/yolov2-voc.xml + model: /opt/openvino_toolkit/models/public/yolo-v2-tf/FP16/yolo-v2-tf.xml #model: /opt/openvino_toolkit/darkflow/output/fp16/yolov2-voc.xml model_type: yolov2 - engine: MYRIAD + engine: CPU #MYRIAD label: to/be/set/xxx.labels batch: 1 confidence_threshold: 0.5 diff --git a/sample/param/pipeline_people.yaml b/sample/param/pipeline_people.yaml index 5e626484..a68b4cc3 100644 --- a/sample/param/pipeline_people.yaml +++ b/sample/param/pipeline_people.yaml @@ -5,7 +5,7 @@ Pipelines: - name: FaceDetection model: /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.xml engine: CPU - label: /to/be/set/xxx.labels + label: /opt/openvino_toolkit/models/face_detection/output/intel/face-detection-adas-0001/FP16/face-detection-adas-0001.labels batch: 1 confidence_threshold: 0.5 enable_roi_constraint: true # set enable_roi_constraint to false if you don't want to make the inferred ROI (region of interest) constrained into the camera frame @@ -17,7 +17,7 @@ Pipelines: - name: EmotionRecognition model: /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml engine: CPU - label: /opt/openvino_toolkit/models/emotions-recognition/output/FP32/Retail/object_attributes/emotions_recognition/0003/dldt/emotions-recognition-retail-0003.labels + label: /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.labels batch: 16 - name: HeadPoseEstimation model: /opt/openvino_toolkit/models/head-pose-estimation/output/intel/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml diff --git a/sample/param/pipeline_reidentification.yaml b/sample/param/pipeline_reidentification.yaml index 012ea683..5a0d472a 100644 --- a/sample/param/pipeline_reidentification.yaml +++ b/sample/param/pipeline_reidentification.yaml @@ -10,7 +10,7 @@ Pipelines: confidence_threshold: 0.5 enable_roi_constraint: true # set enable_roi_constraint to false if you don't want to make the inferred ROI (region of interest) constrained into the camera frame - name: PersonReidentification - model: /opt/openvino_toolkit/models/person-reidentification/output/intel/person-reidentification-retail-0031/FP32/person-reidentification-retail-0031.xml + model: /opt/openvino_toolkit/models/person-reidentification/output/intel/person-reidentification-retail-0277/FP32/person-reidentification-retail-0277.xml engine: CPU label: to/be/set/xxx.labels batch: 1 diff --git a/sample/param/pipeline_segmentation.yaml b/sample/param/pipeline_segmentation.yaml index fd4a7851..bd5a1b80 100644 --- a/sample/param/pipeline_segmentation.yaml +++ b/sample/param/pipeline_segmentation.yaml @@ -3,8 +3,8 @@ Pipelines: inputs: [RealSenseCameraTopic] infers: - name: ObjectSegmentation - model: /opt/openvino_toolkit/models/segmentation/output/FP16/frozen_inference_graph.xml - engine: "HETERO:CPU,GPU,MYRIAD" + model: /opt/openvino_toolkit/models/public/deeplabv3/FP16/deeplabv3.xml + engine: CPU #"HETERO:CPU,GPU,MYRIAD" label: to/be/set/xxx.labels batch: 1 confidence_threshold: 0.5 diff --git a/sample/param/pipeline_segmentation_image.yaml b/sample/param/pipeline_segmentation_image.yaml index db607078..616d290d 100644 --- a/sample/param/pipeline_segmentation_image.yaml +++ b/sample/param/pipeline_segmentation_image.yaml @@ -1,10 +1,10 @@ Pipelines: - name: segmentation inputs: [Image] - input_path: /home/intel/ros2_opvn_10/src/ros2_openvino_toolkit/data/images/expressway.jpg + input_path: /opt/openvino_toolkit/ros2_openvino_toolkit/data/images/expressway.jpg infers: - name: ObjectSegmentation - model: /opt/openvino_toolkit/models/semantic-segmentation/output/Transportation/segmentation/semantic_segmentation/icnet_icv/dldt/semantic-segmentation-adas-0001-fp16.xml + model: /opt/openvino_toolkit/models/semantic-segmentation/output/intel/semantic-segmentation-adas-0001/FP16/semantic-segmentation-adas-0001.xml engine: CPU label: to/be/set/xxx.labels batch: 1 diff --git a/sample/param/pipeline_vehicle_detection.yaml b/sample/param/pipeline_vehicle_detection.yaml index 28732fb4..a91af9ea 100644 --- a/sample/param/pipeline_vehicle_detection.yaml +++ b/sample/param/pipeline_vehicle_detection.yaml @@ -5,11 +5,11 @@ Pipelines: - name: ObjectDetection model: /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/intel/vehicle-license-plate-detection-barrier-0106/FP32/vehicle-license-plate-detection-barrier-0106.xml engine: CPU - label: /opt/intel/openvino/deployment_tools/tools/model_downloader/Security/object_detection/barrier/0106/dldt/vehicle-license-plate-detection-barrier-0106.labels + label: /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/intel/vehicle-license-plate-detection-barrier-0106/FP32/vehicle-license-plate-detection-barrier-0106.labels batch: 1 enable_roi_constraint: true # set enable_roi_constraint to false if you don't want to make the inferred ROI (region of interest) constrained into the camera frame - name: VehicleAttribsDetection - model: /opt/openvino_toolkit/models/vehicle-attributes-recongnition/output/intel/vehicle-attributes-recognition-barrier-0039/FP32/vehicle-attributes-recognition-barrier-0039.xml + model: /opt/openvino_toolkit/models/vehicle-attributes-recognition/output/intel/vehicle-attributes-recognition-barrier-0039/FP32/vehicle-attributes-recognition-barrier-0039.xml engine: CPU label: to/be/set/xxx.labels batch: 1 diff --git a/sample/param/pipeline_video.yaml b/sample/param/pipeline_video.yaml index fa632bbb..0872be8e 100644 --- a/sample/param/pipeline_video.yaml +++ b/sample/param/pipeline_video.yaml @@ -1,11 +1,10 @@ Pipelines: - name: segmentation inputs: [Video] - input_path: /home/iei/Videos/object_segmentation.MP4 + input_path: /home/ubuntu20/jiawei/ros-ov/ros2_galactic_openvino_ws/src/ros2_openvino_toolkit/data/car_cut.mp4 infers: - name: ObjectSegmentation - model: /opt/openvino_toolkit/models/segmentation/output/FP32/frozen_inference_graph.xml - #model: /opt/models/mask_rcnn_inception_v2_coco_2018_01_28/output/frozen_inference_graph.xml + model: /opt/openvino_toolkit/models/public/deeplabv3/FP16/deeplabv3.xml engine: CPU label: to/be/set/xxx.labels batch: 1