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

schema: add KeyPoint3D, KeyLine3D, Polygon3D #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions dgp/proto/annotations.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ enum AnnotationType {

// Agent behavior
AGENT_BEHAVIOR = 14; // agent_behavior

// 3D Key Point in sensor space
KEY_POINT_3D = 15; // key_point_3d

// 3D Key Line in sensor space
KEY_LINE_3D = 16; // key_line_3d

// 3D Polygon in sensor space
POLYGON_3D = 17; // polygon_3d
}

// 2D bounding box
Expand Down Expand Up @@ -213,6 +222,68 @@ message Polygon2DAnnotation{
map<string, string> attributes = 3;
}

// 3D point.
message KeyPoint3D {
// (x, y, z) point (in 3D carthesian coordinates).
double x = 1;
double y = 2;
double z = 3;
}

// 3D point annotation.
message KeyPoint3DAnnotation {
// Class identifier (should be in [0, num_classes - 1])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please share where num_classes defined?

uint32 class_id = 1;

// 3D point.
KeyPoint3D point = 2;

// An associative map stores arbitrary attributes, where the key is attribute name
// and the value is attribute value. Both key_type and value_type are string.
map<string, string> attributes = 3;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please share where we can find documentation of keys and value semantics to expect here?


// An identifier key. Used to link with other annotations.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we expand on the semantics here please? What does a proper value look like to make a correct link?

string key = 4;
}

// 3D line annotation.
message KeyLine3DAnnotation{
// Class identifier (should be in [0, num_classes - 1])
uint32 class_id = 1;

// 3D line.
repeated KeyPoint3D vertices = 2;

// An associative map stores arbitrary attributes, where the key is attribute name
// and the value is attribute value. Both key_type and value_type are string.
map<string, string> attributes = 3;

// An identifier key. Used to link with other annotations.
string key = 4;
}

message PolygonPoint3D {
// (x, y, z) point (in 3D carthesian coordinates).
double x = 1;
double y = 2;
double z = 3;
}

// 3D polygon annotation.
message Polygon3DAnnotation{
// Class identifier (should be in [0, num_classes - 1])
uint32 class_id = 1;

// 3D polygon.
// Points should be put into this field with counter-clockwise order.
repeated PolygonPoint3D vertices = 2;

// An associative map stores arbitrary attributes, where the key is attribute name
// and the value is attribute value. Both key_type and value_type are string.
map<string, string> attributes = 3;
}


// List of BoundingBox2DAnnotation
message BoundingBox2DAnnotations {
repeated BoundingBox2DAnnotation annotations = 1;
Expand All @@ -237,3 +308,18 @@ message KeyLine2DAnnotations {
message Polygon2DAnnotations {
repeated Polygon2DAnnotation annotations = 1;
}

// List of KeyPoint3DAnnotation
message KeyPoint3DAnnotations {
repeated KeyPoint3DAnnotation annotations = 1;
}

// List of KeyLine3DAnnotation
message KeyLine3DAnnotations {
repeated KeyLine3DAnnotation annotations = 1;
}

// List of Polygon3DAnnotation
message Polygon3DAnnotations {
repeated Polygon3DAnnotation annotations = 1;
}
Loading