ros-perception / vision_msgs

Algorithm-agnostic computer vision message types for ROS.
Apache License 2.0
155 stars 75 forks source link

Add basic segmentation message #1

Closed LoyVanBeek closed 7 years ago

Kukanani commented 7 years ago

Hi Loy, thanks for the PR!

I still wonder about the best way to represent the different categories. String seems that it would be OK, but what about if you wanted to store additional information about each of the classes, such as the fill color to use in the segmented image? If there is a standardized way to store information on the ROS param server, the integer values in the Image could directly map to IDs in the param server vision database, and then the color, name, etc. could all be looked up. If that's an acceptable use case, then I think this whole message might not even be necessary, because it would only contain an image! But let me know what you think.

LoyVanBeek commented 7 years ago

I've been thinking about how to do this as well. If you look at the segmentation masks in eg. http://blog.mapillary.com/product/2017/05/03/mapillary-vistas-dataset.html, the segmenter indeed has a RGB(A) color per label.

Its also possible to do everything in one message: a list of (ColorRGBA, String) pairs as a key/value map. But this is quite wasteful although self-contained. Putting this in the parameter server and linking to that in a SegmenterInfo-message, similar to ClassifierInfo could also work.

Kukanani commented 7 years ago

I'm going to close the PR for now, because based on this discussion, I don't see a clear need for a new type of segmentation message. Thanks for bringing up this use case though!