diff --git a/CMakeLists.txt b/CMakeLists.txt index 76970c4..4ec62d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,14 +48,14 @@ find_package(catkin REQUIRED COMPONENTS # Generate messages in the 'msg' folder add_message_files( FILES + CategoryDistribution.msg + ClassifierInfo.msg Classification2D.msg Classification3D.msg - ClassifierInfo.msg Detection2D.msg Detection2DArray.msg Detection3D.msg Detection3DArray.msg - BoundingBox3D.msg ) ## Generate services in the 'srv' folder diff --git a/README.md b/README.md index 5d11917..28982dc 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ primary types of classifiers: 2. **Detectors**, which identify class probabilities as well as the poses of those classes given a sensor input +The class probabilities are stored with a CategoryDistribution message, which +is essentially a map from integer IDs to floats. + Message types exist separately for 2D (using `sensor_msgs/Image`) and 3D (using `sensor_msgs\PointCloud2`). The metadata that is stored for each object is application-specific, and so this package places very few constraints on the diff --git a/msg/BoundingBox3D.msg b/msg/BoundingBox3D.msg deleted file mode 100644 index 7e2c6e3..0000000 --- a/msg/BoundingBox3D.msg +++ /dev/null @@ -1,5 +0,0 @@ -# position and rotation of the bounding box -geometry_msgs/Pose pose - -# size of the bounding box -geometry_msgs/Vector3 size \ No newline at end of file diff --git a/msg/Classification2D.msg b/msg/Classification2D.msg index 09582e1..375e8d4 100644 --- a/msg/Classification2D.msg +++ b/msg/Classification2D.msg @@ -5,16 +5,9 @@ Header header -# IDs of elements detected with any nonzero probability. -# Does not have to include all possible object -# ids, the scores for any ids not listed are assumed to be 0. -int64[] ids - -# The probabilities or confidence values of the detected elements. Must be -# sorted to correspond with the ids field, above -# 0-1, should sum to 1 or less, must be the same length as ids -float64[] scores +# Class probabilities +CategoryDistribution results # The 2D data that generated these results (i.e. region proposal cropped out of -# the image). Not required for all detectors, so it may be empty. -sensor_msgs/Image source \ No newline at end of file +# the image). Not required for all use cases, so it may be empty. +sensor_msgs/Image source_img \ No newline at end of file diff --git a/msg/Classification3D.msg b/msg/Classification3D.msg index 2ed994f..3f33019 100644 --- a/msg/Classification3D.msg +++ b/msg/Classification3D.msg @@ -5,16 +5,9 @@ Header header -# IDs of elements detected with any nonzero probability. -# Does not have to include all possible object -# ids, the scores for any ids not listed are assumed to be 0. -int64[] ids +# Class probabilities +CategoryDistribution results -# The probabilities or confidence values of the detected elements. Must be -# sorted to correspond with the ids field, above -# 0-1, should sum to 1 or less, must be the same length as ids -float64[] scores - -# The 2D data that generated these results (i.e. region proposal cropped out of +# The 3D data that generated these results (i.e. region proposal cropped out of # the image). Not required for all detectors, so it may be empty. -sensor_msgs/PointCloud2 source \ No newline at end of file +sensor_msgs/PointCloud2 source_cloud \ No newline at end of file diff --git a/msg/Detection2D.msg b/msg/Detection2D.msg index 37b931c..0b97d88 100644 --- a/msg/Detection2D.msg +++ b/msg/Detection2D.msg @@ -1,16 +1,18 @@ -# Defines a 2D detection result. +# Defines a 3D detection result. # -# This extends a basic 2D classification by including position information, +# This extends a basic 3D classification by including position information, # allowing a classification result for a specific position in an image to # to be located in the larger image. -# non-geometric results of detection. -vision_msgs/Classification2D classification +Header header + +# Class probabilities +CategoryDistribution results # The x/y position and (optional) rotation of the bounding box center. geometry_msgs/Pose2D pose # (Optional) The size of the bounding box surrounding the object. The center of -# the bounding box is the position of the detection point. +# the bounding box is the position of the pose. float32 bbox_size_x float32 bbox_size_y \ No newline at end of file diff --git a/msg/Detection3D.msg b/msg/Detection3D.msg index b28dee0..4a16804 100644 --- a/msg/Detection3D.msg +++ b/msg/Detection3D.msg @@ -4,8 +4,10 @@ # allowing a classification result for a specific position in an image to # to be located in the larger image. -# non-geometric class probability. -vision_msgs/Classification3D classification +Header header + +# Class probabilities +CategoryDistribution results # The element's pose. This pose should be # defined as the pose of some fixed reference point on the object, such as the @@ -14,5 +16,6 @@ vision_msgs/Classification3D classification # setting classification.header.frame_id. geometry_msgs/Pose pose -# (Optional) The bounding box in 3D space that surrounds the object. -vision_msgs/BoundingBox3D bbox \ No newline at end of file +# The 3D data that generated these results (i.e. region proposal cropped out of +# the image). Not required for all detectors, so it may be empty. +sensor_msgs/PointCloud2 source_cloud \ No newline at end of file