binary
Last updated
Last updated
The “binary" type of object is used to describe image information. Specifically, in the VisionAI format, this type is used to represent the semantic segmentation mask in RLE format.
The pixel-wise mask information can be compressed using the Run-Length Encoding (RLE) method. For example, the sequence "11122222222000000000000" can be compressed to "#3V1#8V2#13V0". The number after the "#" character indicates the count of the consecutive pixels with the corresponding value indicated after the "V" character. This method provides superior compression ratios compared to the original data, especially when there are repeated values.
In another example, if the mask pixels from left to right are "car, car, car, sky, sky, sky, sky", the corresponding RLE value will be
#3V1#4V2
In this example, the numbers "3" and "4" represent the counts of consecutive pixels for the "car" and "sky" classes, respectively. The class numbers are indicated by "V1" and "V2", which are defined in the tags field.
In the VisionAI format, the binary data type of the segmentation mask is considered dynamic information, which is defined at the frames-objects level. This information describes the mask of a certain frame captured from a stream(sensor).
name | description | type | required |
---|---|---|---|
To describe a semantic segmentation dataset with one camera sensor:
sensor: camera (#camera1)
ontology
background
person
bicycle
car
motorcycle
airplane
bus
train
truck
boat
trafficlight
Example Code
name
description
type
required
name
The name of this binary. In VisionAI format, it uses “semantic_mask“ as the value for the semantic segmentation RLE information.
string
true
val
The semantic mask value is based on Run-Length Encoding (RLE) defined above.
string
true
data_type
The data type of the binary. It is a required field in OpenLABEL, please leave it as ““.
string
true
encoding
The encoding method. It supports “rle“ for value only as defined above.
string
true
stream
Represents which stream this mask is on.
string
true