poly2d
Last updated
Last updated
The VisionAI format provides the polygons (2D) shape “poly2d“ to describe individual objects. They can be expressed as lists of x,y-coordinates using MODE_POLY2D_ABSOLUTE.
${OBJECT_TYPE}
The name of this type. This case is “poly_2d”.
object
-
true
name
The name of this poly2d. Usually to be "poly2d_shape".
string
-
true
val
Meanings of each element in order. X-coordinate is at the element with odd order. Y-coordinate is at the even one.
even number elements array of int
px
true
closed
Indicated whether this shape is closed. If this value is true, this shape is a polygon. Otherwise, it is a polyline.
boolean
true
mode
Define the mode of the polyline list of values. Currently, we only allow MODE_POLY2D_ABSOLUTE in the field. MODE_POLY2D_ABSOLUTE means every point of this polygon is represented by its absolute coordinate.
string
true
stream
Represents which stream this shape is on.
string
-
true
confidence_score
The confidence score of model prediction of this object. Ground truth does not have this attribute.
number
-
false
attributes
attributes this bounding box has
object
-
false
<準備一張圖>
hus, a user application can directly read specific objects, without the need to load the PNG image and find the object of interest. The counterpart is an increased JSON size. Polygons (2D) can be expressed directly as lists of x,y-coordinates, using MODE_POLY2D_ABSOLUTE. However, this may create very large and redundant information. Lossless compression mechanisms can be applied to convert the, possibly long, list of x,y-coordinates into smaller strings:
To describe a polygon dataset with one camera sensor:
sensor: camera (#camera1)
ontology:
people
ischild - boolean (static info)
direction - front, left, right, back (dynamic info)
age - number (static info)
car
color - white, silver, blue, red, black (static info)
truck
bus
Example Code
To describe a polyline dataset with one camera sensor:
sensor: camera (#camera1)
ontology:
landmarkings
color (vec) - white, yellow, red (static)
type (vec) - solid, dash (static)
lane - number (dynamic)
curb
Example Code