ros2与深度学习教程-整合人脸检测
os2与深度学习教程-整合人脸检测
说明:
- 介绍如何使用ros2_openvino_toolkit例程face-detection
- 本例子可实现人脸检测,年龄检测,表情检测
步骤:
- StandardCamera指使用一般的USB相机测试
- 相关模型文件和label文件下载参考ros2与深度学习教程-整合ros2_openvino_toolkit
- pipeline_people.launch.py 人脸识别
- 检查配置文件pipeline_people.yaml的input , model, label是否都正确
- 内容如下:
Pipelines:
- name: people
inputs: [StandardCamera]
infers:
- 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/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
- name: AgeGenderRecognition
model: /opt/openvino_toolkit/models/age-gender-recognition/output/intel/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml
engine: CPU
label: to/be/set/xxx.labels
batch: 16
- 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/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
engine: CPU
label: to/be/set/xxx.labels
batch: 16
outputs: [ImageWindow, RosTopic, RViz]
connects:
- left: StandardCamera
right: [FaceDetection]
- left: FaceDetection
right: [AgeGenderRecognition, EmotionRecognition, HeadPoseEstimation, ImageWindow, RosTopic, RViz]
- left: AgeGenderRecognition
right: [ImageWindow, RosTopic, RViz]
- left: EmotionRecognition
right: [ImageWindow, RosTopic, RViz]
- left: HeadPoseEstimation
right: [ImageWindow, RosTopic, RViz]
Common:
测试:
- 启动命令
ros2 launch dynamic_vino_sample pipeline_people.launch.py
- 效果图
- 查看所有话题
$ ros2 topic list
/clicked_point
/initialpose
/move_base_simple/goal
/openvino_toolkit/people/detected_landmarks
/openvino_toolkit/people/detected_license_plates
/openvino_toolkit/people/detected_vehicles_attribs
/openvino_toolkit/people/faces
/openvino_toolkit/people/person_attributes
/openvino_toolkit/people/reidentified_faces
/openvino_toolkit/people/reidentified_persons
/openvino_toolkit/people/segmented_obejcts
/parameter_events
/ros2_openvino_toolkit/age_genders_Recognition
/ros2_openvino_toolkit/emotions_recognition
/ros2_openvino_toolkit/face_detection
/ros2_openvino_toolkit/headposes_estimation
/ros2_openvino_toolkit/image_rviz
/rosout
/tf
/tf_static
- 查看/ros2_openvino_toolkit/image_rviz
ros2 run rqt_image_view rqt_image_view
- 效果图
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号