Browse Source

detect faces updates for noetic

The following demo appears to work now.

roslaunch stretch_deep_perception stretch_detect_faces.launch

One key change was to make sure to use a Python 3 version of
OpenCV (import cv2) with the Inference Engine. Otherwise, you
get errors like the following:

self.head_pose_model = cv2.dnn.readNet(head_pose_weights_filename, head_pose_config_filename)
cv2.error: OpenCV(4.2.0) ../modules/dnn/src/dnn.cpp:3298: error: (-2:Unspecified error) Build OpenCV with Inference Engine to enable loading models from Model Optimizer. in function 'readFromModelOptimizer'

My installation had two different pip versions of OpenCV and
an apt version of OpenCV, which created problems.

The last change I made was to fix frame_id by remove the
initial slash.
pull/24/head
Charlie Kemp 3 years ago
parent
commit
37d23f4664
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      stretch_deep_perception/nodes/detection_node_python3.py
  2. +1
    -1
      stretch_deep_perception/nodes/detection_ros_markers_python3.py

+ 1
- 1
stretch_deep_perception/nodes/detection_node_python3.py View File

@ -130,7 +130,7 @@ class DetectionNode:
def publish_point_cloud(self):
header = Header()
header.frame_id = '/camera_color_optical_frame'
header.frame_id = 'camera_color_optical_frame'
header.stamp = rospy.Time.now()
fields = [PointField('x', 0, PointField.FLOAT32, 1),
PointField('y', 4, PointField.FLOAT32, 1),

+ 1
- 1
stretch_deep_perception/nodes/detection_ros_markers_python3.py View File

@ -26,7 +26,7 @@ class DetectionBoxMarker:
bgr = id_color_image[0,0]
self.id_color = [bgr[2], bgr[1], bgr[0]]
self.frame_id = '/camera_color_optical_frame'
self.frame_id = 'camera_color_optical_frame'
self.name = marker_base_name

Loading…
Cancel
Save