Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hair roi to people_recognition #58

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

GustavoDCC
Copy link
Contributor

I add the ROI for the hair to proceed with the color extraction.

Comment on lines 227 to 230
Convert shirt colors array to label string

:param: shirt_colors: Array to colors
:return: string label
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shirt -> hair

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I see some significant overlap with _shirt_colors_to_label, so maybe reused some code instead of copying

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it is allowed to add another parameter "hair_colors" in Person2D for genpy.message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple colors?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No multiple colors. Currently Person2D has the parameter tshirt color and for the hair color we need to add another parameter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is a different property. So we would need to extend the msg for that.

@GustavoDCC GustavoDCC requested a review from MatthijsBurgh May 24, 2024 16:56
@GustavoDCC GustavoDCC force-pushed the receptionist_hair_color branch from 4de9c07 to a2bb487 Compare May 28, 2024 19:19
hair_roi.height = max(int(face_roi.height/6), 5)
hair_roi.width = max(face_roi.width, 5)
hair_roi.y_offset = min(hair_roi.y_offset, image_shape[0] - hair_roi.height)
rospy.logdebug("face_roi: {}, hair_roi: {}, img.shape: {}".format(face_roi, hair_roi, image_shape))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rospy.logdebug("face_roi: {}, hair_roi: {}, img.shape: {}".format(face_roi, hair_roi, image_shape))
rospy.logdebug(f"{face_roi=}, {hair_roi=}, {image_shape=}")

@GustavoDCC GustavoDCC requested a review from MatthijsBurgh July 6, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants