Skip to content

Commit

Permalink
fixed image crop
Browse files Browse the repository at this point in the history
  • Loading branch information
Benteng Ma authored and tiago committed Feb 5, 2024
1 parent f9743ae commit 47ebc7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/vision/lasr_vision_torch/nodes/service
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def detect(request: TorchFaceFeatureDetectionRequest) -> TorchFaceFeatureDetecti
head_mask_data, head_mask_shape, head_mask_dtype = request.head_mask_data, request.head_mask_shape, request.head_mask_dtype
torsal_mask = message2numpy(torso_mask_data, torso_mask_shape, torso_mask_dtype)
head_mask = message2numpy(head_mask_data, head_mask_shape, head_mask_dtype)
print(torso_mask_shape)
print(head_mask_shape)
# print(torso_mask_shape)
# print(head_mask_shape)

# 'hair', 'hat', 'glasses', 'face'
input_image = torch.from_numpy(frame).permute(2, 0, 1).unsqueeze(0).float()
Expand Down
2 changes: 1 addition & 1 deletion skills/scripts/unit_test_describe_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

sm.execute()

# print('\n\nDetected people:', sm.userdata['people'])
print('\n\nDetected people:', sm.userdata['people'])

rospy.signal_shutdown("down")
2 changes: 1 addition & 1 deletion skills/src/lasr_skills/describe_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def execute(self, userdata):
torso_mask_data, torso_mask_shape, torso_mask_dtype = numpy2message(torso_mask)
head_mask_data, head_mask_shape, head_mask_dtype = numpy2message(head_mask)

full_frame = cv2_img.cv2_img_to_msg(face_region)
full_frame = cv2_img.cv2_img_to_msg(img)
features.extend(self.torch_face_features(
full_frame,
torso_mask_data, torso_mask_shape, torso_mask_dtype,
Expand Down

0 comments on commit 47ebc7c

Please sign in to comment.