This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
ROS ov2.0 #195
Open
ChloeWu1
wants to merge
41
commits into
intel:ros
Choose a base branch
from
ChloeWu1:noetic-ov2022.1
base: ros
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ROS ov2.0 #195
Changes from 29 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
ffa78bf
fix engine api
ChloeWu1 ac2e596
fix pipeline api
ChloeWu1 9dfd32f
fix base_inference api
ChloeWu1 aed1c24
fix version info
ChloeWu1 04d7a0d
fix base model
ChloeWu1 4921a24
fix age gender detection pipeline
ChloeWu1 0b224e2
fix emotion detection pipeline
ChloeWu1 451dfcd
fix head pose detection pipeline
ChloeWu1 f005a2f
fix person reidentification pipeline
ChloeWu1 4273a40
fix object segmentation pipeline
ChloeWu1 6d5b7a0
fix object detection(ssd) pipeline
ChloeWu1 853f773
fix license plate detection pipeline
ChloeWu1 daae598
fix vehicle attribs detection pipeline
ChloeWu1 de67e59
fix person attribs detection pipeline
ChloeWu1 ef7c030
fix object detection(yolo) pipeline
ChloeWu1 0d3d74a
fix face reidentification pipeline
ChloeWu1 0060965
fix landmarks detection pipeline
ChloeWu1 b120aa0
fix pipeline manager
ChloeWu1 4eb2869
fix pipeline params API
ChloeWu1 439c569
fix CMakeLists
ChloeWu1 68a5aa4
clean code and fix head files
ChloeWu1 374b648
Add NCHW and NHWC layout compatibility for object_segmentation and ob…
ChloeWu1 ca444e6
clean code
ChloeWu1 dc8e996
update docs for ov2.0
ChloeWu1 b79a632
fix docs
ChloeWu1 c6f4fa3
fix param name
ChloeWu1 7adb00c
code refine: move input&output info definition to base attribute
ChloeWu1 5ad3792
update doc and model list for ros
ChloeWu1 474c8dd
add dockerfile and instruction for ros
ChloeWu1 a479937
refine dockerfile
ChloeWu1 fed6345
add segmentation maskrcnn pipeline
ChloeWu1 3c23d15
fix vehicle attribs and license plate
ChloeWu1 1158e5c
fix yaml path
ChloeWu1 cfea37d
fix doc dockerfile and model list
ChloeWu1 3d27120
fix param
ChloeWu1 809ebfb
fix model download list
ChloeWu1 3d97a61
fix label path
ChloeWu1 b7f6ee6
fix label path for docker
ChloeWu1 98fb7ce
update documents for ros 2.0
ChloeWu1 066ab65
Merge branch 'ros' into noetic-ov2022.1
ChloeWu1 fad9c8b
fix docker
ChloeWu1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This file can be used with the --list option of the model converter. | ||
mobilenet-ssd | ||
deeplabv3 | ||
mask_rcnn_inception_resnet_v2_atrous_coco | ||
vehicle-license-plate-detection-barrier-0123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file can be used with the --list option of the model downloader. | ||
face-detection-adas-0001 | ||
age-gender-recognition-retail-0013 | ||
emotions-recognition-retail-0003 | ||
landmarks-regression-retail-0009 | ||
license-plate-recognition-barrier-0001 | ||
person-detection-retail-0013 | ||
person-attributes-recognition-crossroad-0230 | ||
person-reidentification-retail-0277 | ||
vehicle-attributes-recognition-barrier-0039 | ||
vehicle-license-plate-detection-barrier-0106 | ||
head-pose-estimation-adas-0001 | ||
human-pose-estimation-0001 | ||
semantic-segmentation-adas-0001 | ||
mobilenet-ssd | ||
deeplabv3 |
194 changes: 194 additions & 0 deletions
194
doc/quick_start/getting_started_with_Noetic_Ubuntu20.04_ov2.0.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
# ROS_NOETIC_OpenVINO_Toolkit | ||
|
||
**NOTE:** | ||
Below steps have been tested on **Ubuntu 20.04**. | ||
|
||
## 1. Environment Setup | ||
* Install ROS Noetic ([guide](http://wiki.ros.org/noetic/Installation/Ubuntu)). | ||
|
||
* Install Intel® OpenVINO™ Toolkit Version: 2022.1 ([guide](https://docs.openvino.ai/2022.1/openvino_docs_install_guides_installing_openvino_linux.html)). | ||
* Install from an achive file ([guide](https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html)). | ||
Tips: Both runtime and development tool are needed, `pip` is recommended for installing the development tool ([guide](https://docs.openvino.ai/latest/openvino_docs_install_guides_install_dev_tools.html)). | ||
* Install from 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)). | ||
|
||
* Install Dependency | ||
* Install gflags | ||
``` | ||
sudo apt-get install -y libgflags-dev | ||
``` | ||
|
||
## 2. Build and Installation | ||
* Install ROS_OpenVINO_Toolkit packages | ||
``` | ||
mkdir -p ~/catkin_ws/src | ||
cd ~/catkin_ws/src | ||
git clone https://github.com/intel/ros_openvino_toolkit -b noetic | ||
git clone https://github.com/intel/object_msgs | ||
git clone https://github.com/IntelRealSense/realsense-ros.git | ||
cd realsense-ros | ||
git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1` | ||
``` | ||
* Install dependencies | ||
``` | ||
sudo apt-get install ros-noetic-ddynamic-reconfigure | ||
``` | ||
* Build package | ||
``` | ||
source /opt/ros/noetic/setup.bash | ||
source <OpenVINO_INSTALL_DIR>/setupvars.sh | ||
cd ~/catkin_ws | ||
catkin_make_isolated | ||
source ./devel_isolated/setup.bash | ||
``` | ||
|
||
## 3. Running the Demo | ||
### Install OpenVINO 2022.1 by source code | ||
* See all available models | ||
``` | ||
cd <OpenVINO_SOURCECODE_DIR>/openvino/thirdparty/open_model_zoo/tools/model_tools | ||
sudo python3 downloader.py --print_all | ||
``` | ||
|
||
* Download the optimized Intermediate Representation (IR) of model (execute once): | ||
``` | ||
cd <OpenVINO_SOURCECODE_DIR>/openvino/thirdparty/open_model_zoo/tools/model_tools | ||
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-0277 --output_dir /opt/openvino_toolkit/models/person-reidentification/output | ||
sudo python3 downloader.py --name landmarks-regression-retail-0009 --output_dir /opt/openvino_toolkit/models/landmarks-regression/output | ||
sudo python3 downloader.py --name face-reidentification-retail-0095 --output_dir /opt/openvino_toolkit/models/face-reidentification-retail/output | ||
sudo python3 downloader.py --name vehicle-attributes-recognition-barrier-0039 --output_dir /opt/openvino_toolkit/models/vehicle-attributes-recognition/output | ||
sudo python3 downloader.py --name license-plate-recognition-barrier-0001 --output_dir /opt/openvino_toolkit/models/license-plate-recognition/output | ||
``` | ||
|
||
* If the model (tensorflow, caffe, MXNet, ONNX, Kaldi)need to be converted to intermediate representation (For example the model for object detection) | ||
* mobilenet-ssd (replaced ssd_mobilenet_v2_coco to mobilenet-ssd for object detection in ov2022) | ||
``` | ||
cd <OpenVINO_SOURCECODE_DIR>/openvino/thirdparty/open_model_zoo/tools/model_tools | ||
sudo python3 downloader.py --name mobilenet-ssd --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output | ||
sudo python3 converter.py --name mobilenet-ssd -d /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output/ -o /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output/convert | ||
``` | ||
* vehicle-license-plate-detection-barrier-0123 | ||
``` | ||
cd <OpenVINO_SOURCECODE_DIR>/openvino/thirdparty/open_model_zoo/tools/model_tools | ||
sudo python3 downloader.py --name vehicle-license-plate-detection-barrier-0123 --output_dir /opt/openvino_toolkit/models/vehicle-license-plate-detection-barrier/output | ||
sudo python3 converter.py --name vehicle-license-plate-detection-barrier-0123 -d /opt/openvino_toolkit/models/vehicle-license-plate-detection-barrier/output -o /opt/openvino_toolkit/models/vehicle-license-plate-detection-barrier/output/convert | ||
``` | ||
* deeplabv3 | ||
``` | ||
cd <OpenVINO_SOURCECODE_DIR>/openvino/thirdparty/open_model_zoo/tools/model_tools | ||
sudo python3 downloader.py --name deeplabv3 --output_dir /opt/openvino_toolkit/models/deeplabv3/output | ||
sudo python3 converter.py --name deeplabv3 -d /opt/openvino_toolkit/models/deeplabv3/output -o /opt/openvino_toolkit/models/deeplabv3/output/convert | ||
``` | ||
|
||
* Copy label files (execute once) | ||
* Before launch, copy label files to the same model path, make sure the model path and label path match the ros_openvino_toolkit/vino_launch/param/xxxx.yaml. | ||
``` | ||
sudo cp ~/catkin_ws/src/ros_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 ~/catkin_ws/src/ros_openvino_toolkit/data/labels/emotions-recognition/FP32/emotions-recognition-retail-0003.labels /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP16/ | ||
sudo cp ~/catkin_ws/src/ros_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 ~/catkin_ws/src/ros_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 ~/catkin_ws/src/ros_openvino_toolkit/data/labels/object_detection/vehicle-license-plate-detection-barrier-0106.labels /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/convert/intel/vehicle-license-plate-detection-barrier-0106/FP32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is used FP16/vehicle-license-plate-detection-barrier-0106.labels at the pipeline_vehicle_detection.yaml. but there are FP32 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
sudo cp ~/catkin_ws/src/ros_openvino_toolkit/data/labels/object_detection/mobilenet-ssd.labels /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output/convert/public/mobilenet-ssd/FP16 | ||
sudo cp ~/catkin_ws/src/ros_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/deeplabv3/output/convert/public/deeplabv3/FP16 | ||
sudo mv /opt/openvino_toolkit/models/deeplabv3/output/convert/public/deeplabv3/FP16/frozen_inference_graph.labels /opt/openvino_toolkit/models/deeplabv3/output/convert/public/deeplabv3/FP16/deeplabv3.labels | ||
``` | ||
### Install OpenVINO 2022.1 by PIP | ||
* OMZ tools are provided for downloading and converting OMZ models in ov2022 ([guide](https://pypi.org/project/openvino-dev/)). | ||
|
||
* See all available models | ||
``` | ||
omz_downloader --print_all | ||
``` | ||
|
||
* Download the optimized Intermediate Representation (IR) of model (execute once), for example: | ||
``` | ||
omz_downloader --name face-detection-adas-0001 --output_dir /opt/openvino_toolkit/models/face_detection/output | ||
omz_downloader --name age-gender-recognition-retail-0013 --output_dir /opt/openvino_toolkit/models/age-gender-recognition/output | ||
omz_downloader --name emotions-recognition-retail-0003 --output_dir /opt/openvino_toolkit/models/emotions-recognition/output | ||
omz_downloader --name head-pose-estimation-adas-0001 --output_dir /opt/openvino_toolkit/models/head-pose-estimation/output | ||
omz_downloader --name person-detection-retail-0013 --output_dir /opt/openvino_toolkit/models/person-detection/output | ||
omz_downloader --name person-reidentification-retail-0277 --output_dir /opt/openvino_toolkit/models/person-reidentification/output | ||
omz_downloader --name landmarks-regression-retail-0009 --output_dir /opt/openvino_toolkit/models/landmarks-regression/output | ||
omz_downloader --name semantic-segmentation-adas-0001 --output_dir /opt/openvino_toolkit/models/semantic-segmentation/output | ||
omz_downloader --name vehicle-attributes-recognition-barrier-0039 --output_dir /opt/openvino_toolkit/models/vehicle-attributes-recognition/output | ||
omz_downloader --name license-plate-recognition-barrier-0001 --output_dir /opt/openvino_toolkit/models/license-plate-recognition/output | ||
``` | ||
* Copy label files (execute once) | ||
``` | ||
sudo cp ~/catkin_ws/src/ros_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 ~/catkin_ws/src/ros_openvino_toolkit/data/labels/emotions-recognition/FP32/emotions-recognition-retail-0003.labels /opt/openvino_toolkit/models/emotions-recognition/output/intel/emotions-recognition-retail-0003/FP16/ | ||
sudo cp ~/catkin_ws/src/ros_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 ~/catkin_ws/src/ros_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 ~/catkin_ws/src/ros_openvino_toolkit/data/labels/object_detection/vehicle-license-plate-detection-barrier-0106.labels /opt/openvino_toolkit/models/vehicle-license-plate-detection/output/convert/intel/vehicle-license-plate-detection-barrier-0106/FP32 | ||
sudo cp ~/catkin_ws/src/ros_openvino_toolkit/data/labels/object_detection/mobilenet-ssd.labels /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output/convert/public/mobilenet-ssd/FP16 | ||
sudo cp ~/catkin_ws/src/ros_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/openvino_toolkit/models/deeplabv3/output/convert/public/deeplabv3/FP16 | ||
sudo mv /opt/openvino_toolkit/models/deeplabv3/output/convert/public/deeplabv3/FP16/frozen_inference_graph.labels /opt/openvino_toolkit/models/deeplabv3/output/convert/public/deeplabv3/FP16/deeplabv3.labels | ||
``` | ||
|
||
* If the model (tensorflow, caffe, MXNet, ONNX, Kaldi) need to be converted to intermediate representation (such as the model for object detection): | ||
* mobilenet-ssd (replaced ssd_mobilenet_v2_coco to mobilenet-ssd for object detection in ov2022) | ||
``` | ||
omz_downloader --name mobilenet-ssd --output_dir /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output | ||
omz_converter --name mobilenet-ssd -d /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output -o /opt/openvino_toolkit/models/object_detection/mobilenet_ssd/output/convert | ||
``` | ||
* vehicle-license-plate-detection-barrier-0123 | ||
``` | ||
omz_downloader --name vehicle-license-plate-detection-barrier-0123 --output_dir /opt/openvino_toolkit/models/vehicle-license-plate-detection-barrier/output | ||
omz_converter --name vehicle-license-plate-detection-barrier-0123 -d /opt/openvino_toolkit/models/vehicle-license-plate-detection-barrier/output -o /opt/openvino_toolkit/models/vehicle-license-plate-detection-barrier/output/convert | ||
``` | ||
|
||
* deeplabv3 | ||
``` | ||
omz_downloader --name deeplabv3 --output_dir /opt/openvino_toolkit/models/deeplabv3/output | ||
omz_converter --name deeplabv3 -d /opt/openvino_toolkit/models/deeplabv3/output -o /opt/openvino_toolkit/models/deeplabv3/output/convert | ||
``` | ||
|
||
* Please check the parameter configuration in ros_openvino_toolkit/sample/param/xxxx.yaml before lauching, make sure parameters such as model_path, label_path and input_path are set correctly. | ||
* run face detection sample code input from StandardCamera. | ||
``` | ||
roslaunch vino_launch pipeline_people.launch | ||
``` | ||
* run person reidentification sample code input from StandardCamera. | ||
``` | ||
roslaunch vino_launch pipeline_face_reidentification.launch | ||
``` | ||
* run person reidentification sample code input from StandardCamera | ||
``` | ||
roslaunch vino_launch pipeline_reidentification.launch | ||
``` | ||
* run face detection sample code input from Image. | ||
``` | ||
roslaunch vino_launch pipeline_image.launch | ||
``` | ||
* run object sample | ||
``` | ||
roslaunch vino_launch pipeline_object.launch | ||
``` | ||
* run object topic sample | ||
``` | ||
roslaunch vino_launch pipeline_object_topic.launch | ||
``` | ||
* run object segmentation sample code input from RealSenseCamera. | ||
``` | ||
roslaunch vino_launch pipeline_segmentation.launch | ||
``` | ||
* run vehicle detection sample code input from StandardCamera. | ||
``` | ||
roslaunch vino_launch pipeline_vehicle_detection.launch | ||
``` | ||
* run video sample | ||
``` | ||
roslaunch vino_launch pipeline_video.launch | ||
``` | ||
|
||
# More Information | ||
|
||
###### *Any security issue should be reported using process at https://01.org/security* | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no found the xml: face-reidentification-retail-0095.xml
if it is need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the xml vehicle-license-plate-detection-barrier-0123.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.