Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 987c926

Browse files
authored
Merge pull request #35 from intel/devel
merge devel to master for 0.5.0 release
2 parents 24bbdc6 + 7eea3d0 commit 987c926

File tree

98 files changed

+3501
-609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+3501
-609
lines changed

README.md

Lines changed: 109 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ From the view of logic implementation, the package introduces the definitions of
2525

2626
![Logic_Flow](https://github.com/intel/ros_openvino_toolkit/blob/master/data/images/impletation_logic.PNG "OpenVINO RunTime Logic Flow")
2727

28-
Once a corresponding program is launched with a specified .yaml config file passed in the .launch.py file or via commandline, _**parameter manager**_ analyzes the configurations about pipeline and the whole framework, then shares the parsed configuration information with pipeline procedure. A _**pipeline instance**_ is created by following the configuration info and is added into _**pipeline manager**_ for lifecycle control and inference action triggering.
28+
Once a corresponding program is launched with a specified .yaml config file passed in the .launch file or via commandline, _**parameter manager**_ analyzes the configurations about pipeline and the whole framework, then shares the parsed configuration information with pipeline procedure. A _**pipeline instance**_ is created by following the configuration info and is added into _**pipeline manager**_ for lifecycle control and inference action triggering.
2929

3030
The contents in **.yaml config file** should be well structured and follow the supported rules and entity names. Please see [the configuration guidance](https://github.com/intel/ros_openvino_toolkit/blob/master/doc/YAML_CONFIGURATION_GUIDE.md) for how to create or edit the config files.
3131

@@ -57,12 +57,13 @@ Currently, the inference feature list is supported:
5757
|Object Detection| object detection based on SSD-based trained models.|
5858
|Vehicle Detection| Vehicle and passenger detection based on Intel models.|
5959
|Object Segmentation| object detection and segmentation.|
60+
|Person Reidentification| Person Reidentification based on object detection.|
6061

6162
## ROS interfaces and outputs
6263
### Topic
6364
#### Subscribed Topic
6465
- Image topic:
65-
```/openvino_toolkit/image_raw```([sensor_msgs::Image](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/Image.html))
66+
```/camera/color/image_raw```([sensor_msgs::Image](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/Image.html))
6667
#### Published Topic
6768
- Face Detection:
6869
```/ros_openvino_toolkit/face_detection```([object_msgs::ObjectsInBoxes](https://github.com/intel/object_msgs/blob/master/msg/ObjectsInBoxes.msg))
@@ -75,7 +76,9 @@ Currently, the inference feature list is supported:
7576
- Object Detection:
7677
```/ros_openvino_toolkit/detected_objects```([object_msgs::ObjectsInBoxes](https://github.com/intel/object_msgs/blob/master/msg/ObjectsInBoxes.msg))
7778
- Object Segmentation:
78-
```/ros_openvino_toolkit/segmented_obejcts```([people_msgs::ObjectsInMasks](https://github.com/intel/ros_openvino_toolkit/blob/master/people_msgs/msg/ObjectsInMasks.msg))
79+
```/ros_openvino_toolkit/segmented_obejcts```([people_msgs::ObjectsInMasks](https://github.com/intel/ros_openvino_toolkit/blob/devel/people_msgs/msg/ObjectsInMasks.msg))
80+
- Person Reidentification:
81+
```/ros_openvino_toolkit/reidentified_persons```([people_msgs::ReidentificationStamped](https://github.com/intel/ros_openvino_toolkit/blob/devel/people_msgs/msg/ReidentificationStamped.msg))
7982
- Rviz Output:
8083
```/ros_openvino_toolkit/image_rviz```([sensor_msgs::Image](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/Image.html))
8184

@@ -85,11 +88,12 @@ Currently, the inference feature list is supported:
8588
- Face Detection Service:
8689
```/detect_face``` ([object_msgs::DetectObject](https://github.com/intel/object_msgs/blob/master/srv/DetectObject.srv))
8790
- Age & Gender Detection Service:
88-
```/detect_age_gender``` ([people_msgs::AgeGender](https://github.com/intel/ros_openvino_toolkit/blob/master/people_msgs/srv/AgeGender.srv))
91+
```/detect_age_gender``` ([people_msgs::AgeGender](https://github.com/intel/ros_openvino_toolkit/blob/master/people_msgs/srv/AgeGenderSrv.srv))
8992
- Headpose Detection Service:
90-
```/detect_head_pose``` ([people_msgs::HeadPose](https://github.com/intel/ros_openvino_toolkit/blob/master/people_msgs/srv/HeadPose.srv))
93+
```/detect_head_pose``` ([people_msgs::HeadPose](https://github.com/intel/ros_openvino_toolkit/blob/master/people_msgs/srv/HeadPoseSrv.srv))
9194
- Emotion Detection Service:
92-
```/detect_emotion``` ([people_msgs::Emotion](https://github.com/intel/ros_openvino_toolkit/blob/master/people_msgs/srv/Emotion.srv))
95+
```/detect_emotion``` ([people_msgs::Emotion](https://github.com/intel/ros_openvino_toolkit/blob/master/people_msgs/srv/EmotionSrv.srv))
96+
9397

9498
### RViz
9599
RViz dispaly is also supported by the composited topic of original image frame with inference result.
@@ -108,9 +112,60 @@ See below pictures for the demo result snapshots.
108112
* object detection input from realsense camera
109113
![object_detection_demo_realsense](https://github.com/intel/ros_openvino_toolkit/blob/master/data/images/object_detection.gif "object detection demo realsense")
110114

115+
* object segmentation input from video
116+
![object_segmentation_demo_video](https://github.com/intel/ros_openvino_toolkit/blob/master/data/images/object_segmentation.gif "object segmentation demo video")
117+
118+
* Person Reidentification input from standard camera
119+
![person_reidentification_demo_video](https://github.com/intel/ros2_openvino_toolkit/blob/master/data/images/person-reidentification.gif "person reidentification demo video")
120+
111121
# Installation & Launching
112122
**NOTE:** Intel releases 2 different series of OpenVINO Toolkit, we call them as [OpenSource Version](https://github.com/opencv/dldt/) and [Tarball Version](https://software.intel.com/en-us/openvino-toolkit). This guidelie uses OpenSource Version as the installation and launching example. **If you want to use Tarball version, please follow [the guide for Tarball Version](https://github.com/intel/ros_openvino_toolkit/blob/master/doc/BINARY_VERSION_README.md).**
113123

124+
## Enable Intel® Neural Compute Stick 2 (Intel® NCS 2) under the OpenVINO Open Source version (Optional) </br>
125+
1. Intel Distribution of OpenVINO toolkit </br>
126+
* Download OpenVINO toolkit by following the [guide](https://software.intel.com/en-us/openvino-toolkit/choose-download)</br>
127+
```bash
128+
cd ~/Downloads
129+
wget -c http://registrationcenter-download.intel.com/akdlm/irc_nas/15078/l_openvino_toolkit_p_2018.5.455.tgz
130+
```
131+
* Install OpenVINO toolkit by following the [guide](https://software.intel.com/en-us/articles/OpenVINO-Install-Linux) </br>
132+
```bash
133+
cd ~/Downloads
134+
tar -xvf l_openvino_toolkit_p_2018.5.455.tgz
135+
cd l_openvino_toolkit_p_2018.5.455
136+
# root is required instead of sudo
137+
sudo -E ./install_cv_sdk_dependencies.sh
138+
sudo ./install_GUI.sh
139+
# build sample code under OpenVINO toolkit
140+
source /opt/intel/computer_vision_sdk/bin/setupvars.sh
141+
cd /opt/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/
142+
mkdir build
143+
cd build
144+
cmake ..
145+
make
146+
```
147+
* Configure the Neural Compute Stick USB Driver
148+
```bash
149+
cd ~/Downloads
150+
cat <<EOF > 97-usbboot.rules
151+
SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
152+
SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
153+
SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
154+
EOF
155+
sudo cp 97-usbboot.rules /etc/udev/rules.d/
156+
sudo udevadm control --reload-rules
157+
sudo udevadm trigger
158+
sudo ldconfig
159+
rm 97-usbboot.rules
160+
```
161+
162+
2. Configure the environment (you can write the configuration to your ~/.basrch file)</br>
163+
**Note**: If you used root privileges to install the OpenVINO binary package, it installs the Intel Distribution of OpenVINO toolkit in this directory: */opt/intel/openvino_<version>/*
164+
```bash
165+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/build/intel64/Release/lib
166+
source /opt/intel/computer_vision_sdk/bin/setupvars.sh
167+
```
168+
114169
## Dependencies Installation
115170
One-step installation scripts are provided for the dependencies' installation. Please see [the guide](https://github.com/intel/ros_openvino_toolkit/blob/master/doc/OPEN_SOURCE_CODE_README.md) for details.
116171

@@ -131,22 +186,28 @@ One-step installation scripts are provided for the dependencies' installation. P
131186
sudo ln -s ~/Downloads/models/mask_rcnn_inception_v2_coco_2018_01_28 /opt/models/
132187
#object detection model
133188
cd /opt/openvino_toolkit/open_model_zoo/model_downloader
134-
python3 downloader.py --name ssd300
135-
sudo python3 /opt/openvino_toolkit/dldt/model-optimizer/mo.py --input_model /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/ssd/300/caffe/ssd300.caffemodel --output_dir /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/ssd/300/caffe/output/
189+
python3 ./downloader.py --name mobilenet-ssd
190+
#FP32 precision model
191+
sudo python3 /opt/openvino_toolkit/dldt/model-optimizer/mo.py --input_model /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/mobilenet-ssd/caffe/mobilenet-ssd.caffemodel --output_dir /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/mobilenet-ssd/caffe/output/FP32 --mean_values [127.5,127.5,127.5] --scale_values [127.5]
192+
#FP16 precision model
193+
sudo python3 /opt/openvino_toolkit/dldt/model-optimizer/mo.py --input_model /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/mobilenet-ssd/caffe/mobilenet-ssd.caffemodel --output_dir /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/mobilenet-ssd/caffe/output/FP16 --data_type=FP16 --mean_values [127.5,127.5,127.5] --scale_values [127.5]
136194
* download the optimized Intermediate Representation (IR) of model (excute _once_)<br>
137195
```bash
138196
cd /opt/openvino_toolkit/open_model_zoo/model_downloader
139197
python3 downloader.py --name face-detection-adas-0001
140198
python3 downloader.py --name age-gender-recognition-retail-0013
141199
python3 downloader.py --name emotions-recognition-retail-0003
142200
python3 downloader.py --name head-pose-estimation-adas-0001
201+
python3 downloader.py --name person-detection-retail-0013
202+
python3 downloader.py --name person-reidentification-retail-0076
143203
```
144204
* copy label files (excute _once_)<br>
145205
```bash
146206
sudo cp /opt/openvino_toolkit/ros_openvino_toolkit/data/labels/emotions-recognition/FP32/emotions-recognition-retail-0003.labels /opt/openvino_toolkit/open_model_zoo/model_downloader/Retail/object_attributes/emotions_recognition/0003/dldt
147207
sudo cp /opt/openvino_toolkit/ros_openvino_toolkit/data/labels/face_detection/face-detection-adas-0001.labels /opt/openvino_toolkit/open_model_zoo/model_downloader/Transportation/object_detection/face/pruned_mobilenet_reduced_ssd_shared_weights/dldt
148208
sudo cp /opt/openvino_toolkit/ros_openvino_toolkit/data/labels/object_segmentation/frozen_inference_graph.labels /opt/models/mask_rcnn_inception_v2_coco_2018_01_28/output
149-
sudo cp /opt/openvino_toolkit/ros_openvino_toolkit/data/labels/object_detection/ssd300.labels /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/ssd/300/caffe/output
209+
sudo cp /opt/openvino_toolkit/ros_openvino_toolkit/data/labels/object_detection/mobilenet-ssd.labels /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/mobilenet-ssd/caffe/output/FP32
210+
sudo cp /opt/openvino_toolkit/ros_openvino_toolkit/data/labels/object_detection/mobilenet-ssd.labels /opt/openvino_toolkit/open_model_zoo/model_downloader/object_detection/common/mobilenet-ssd/caffe/output/FP16
150211
```
151212
* set ENV LD_LIBRARY_PATH<br>
152213
```bash
@@ -156,12 +217,49 @@ One-step installation scripts are provided for the dependencies' installation. P
156217
```bash
157218
roslaunch vino_launch pipeline_people_oss.launch
158219
```
159-
220+
221+
* run face detection sample code input from Image.
222+
```bash
223+
roslaunch vino_launch pipeline_image_oss.launch
224+
```
160225
* run object detection sample code input from RealsensCamera.
161226
```bash
162227
roslaunch vino_launch pipeline_object_oss.launch
163228
```
164-
229+
* run object detection sample code input from RealsensCameraTopic.
230+
```bash
231+
roslaunch vino_launch pipeline_object_oss_topic.launch
232+
```
233+
* run object segmentation sample code input from RealSenseCameraTopic.
234+
```bash
235+
roslaunch vino_launch pipeline_segmentation.launch
236+
```
237+
* run object segmentation sample code input from Video.
238+
```bash
239+
roslaunch vino_launch pipeline_video.launch
240+
```
241+
* run person reidentification sample code input from StandardCamera.
242+
```bash
243+
roslaunch vino_launch pipeline_reidentification_oss.launch
244+
```
245+
* run object detection service sample code input from Image
246+
Run image processing service:
247+
```bash
248+
roslaunch vino_launch image_object_server_oss.launch
249+
```
250+
Run example application with an absolute path of an image on another console:
251+
```bash
252+
rosrun dynamic_vino_sample image_object_client ~/catkin_ws/src/ros_openvino_toolkit/data/images/car.png
253+
```
254+
* run face detection service sample code input from Image
255+
Run image processing service:
256+
```bash
257+
roslaunch vino_launch image_people_server_oss.launch
258+
```
259+
Run example application with an absolute path of an image on another console:
260+
```bash
261+
rosrun dynamic_vino_sample image_people_client ~/catkin_ws/src/ros_openvino_toolkit/data/images/team.jpg
262+
```
165263
# TODO Features
166264
* Support **result filtering** for inference process, so that the inference results can be filtered to different subsidiary inference. For example, given an image, firstly we do Object Detection on it, secondly we pass cars to vehicle brand recognition and pass license plate to license number recognition.
167265
* Design **resource manager** to better use such resources as models, engines, and other external plugins.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
background
2+
aeroplane
3+
bicycle
4+
bird
5+
boat
6+
bottle
7+
bus
8+
car
9+
cat
10+
chair
11+
cow
12+
diningtable
13+
dog
14+
horse
15+
motorbike
16+
person
17+
pottedplant
18+
sheep
19+
sofa
20+
train
21+
tvmonitor

0 commit comments

Comments
 (0)