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

Image segmenter output messages. #5

Merged
merged 2 commits into from
Sep 5, 2023
Merged

Image segmenter output messages. #5

merged 2 commits into from
Sep 5, 2023

Conversation

uavster
Copy link
Contributor

@uavster uavster commented Aug 31, 2023

Messages representing the action of a class-agnostic image segmenter.

Issue: #4420

@uavster uavster requested a review from schornakj August 31, 2023 14:27
@uavster uavster force-pushed the mask2d-msgs branch 3 times, most recently from 363d56a to a198b8b Compare September 1, 2023 10:15
Comment on lines 11 to 12
# Result
moveit_studio_vision_msgs/Mask2DArray masks
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what I prefer here.

I see that the Mask2DArray message has a single header for everything, but given that the underlying sensor_msgs/Image already has a header, it is easier to just have this be a moveit_studio_vision_msgs/Mask2D[] field here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was considering this change myself today. The initial goal of Mask2DArray was to support asynchronous updates via a topic that could be synchronized with other topics based on camera timestamp (e.g. for visual servoing) without the strong pre-condition of setting each and every mask image timestamp to the same value, but there's no need to have it in the action because the result will always be paired with the goal by the action mechanism. Will change!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,17 @@
# Message containing a 2D mask.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this message also contain some string label (for classification) and a numeric confidence score for thresholding?

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 think we can decouple segmentation from classification here and have a Mask2DWithClassification message when we have models outputting both. I've seen this in other ROS messages. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

This should be OK if we want to do it that way, but then you'd need 2 separate behaviors with 2 separate data types in the action clients to do different tasks. So that's where I might prefer one message definition, and if we don't use classification data for certain tasks then so be it -- we ignore that part of the payload.

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 have some doubts about the coupling-cohesion implications. Let's talk about this later. I'll merge for now, and we can add changes later.

Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

I'm OK with these changes! If you want to change anything else regarding my comment on classification data, feel free to do that, or else we can save that for later.

@uavster uavster merged commit e499daa into main Sep 5, 2023
2 checks passed
@uavster uavster deleted the mask2d-msgs branch September 5, 2023 10:49
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