Skip to content

Latest commit

 

History

History
203 lines (168 loc) · 14.2 KB

File metadata and controls

203 lines (168 loc) · 14.2 KB

Categories and attributes

When editing the category and task attribute configuration directly, you need to adhere to the following format:

Configuration format

{
    "format_version": "0.1",
    "categories": [
        { ... },
        { ... },
        { ... }
    ],
    "image_attributes": [ // optional image-level attributes
        { ... },
        { ... },
        { ... }
    ],
    "circle_radius": 50, // optional ego circle in 3D vector interfaces
    "warning_rules": [ // optional set of rules that trigger warnings
        { ... },
        { ... },
        { ... }
    ]
}
Name Type Description
categories array of categories Required. List of all possible categories for a label in this dataset.
image_attributes array of attributes List of image-level attributes.
circle_radius int The radius of the circle around the ego position in the 3D cuboid and vector interface. Can be used to indicate a region in which objects should be annotated.
warning_rules array of warning rules List of rules that should generate warnings running a check on a sample

{% hint style="warning" %} The categories array should contain at least one category. {% endhint %}

Category

{
    "name": "car",
    "id": 1,
    "color": [33, 138, 33], // optional
    "has_instances": true, // optional
    "lock_dimensions": true, // optional, false by default
    "lock_rotation": true, // optional, false by default
    "lock_position": true, // optional, false by default
    "attributes": [ // optional object-level attributes
        { ... },
        { ... },
        { ... }
    ],
    "link_attributes": [ // optional link attributes
        { ... },
        { ... },
        { ... }
    ],
    "dimensions": {  // optional, only valid in the point cloud cuboid editor
        "x": 0.6564944386482239,
        "y": 1.3789583444595337,
        "z": 1.6037739515304565
    },
    "foo": "bar" // optional custom key-value pairs. These will be ignored.
}
Name Type Description
name string Required. Name of the category.
id int Required. Index of the category.
color array of 3 float values in [0, 255] RGB color of the category.
has_instances boolean Whether the category contains instances (person, car) or not (sky, road)
attributes array of attributes List of object-level attributes.
link_attributes array of attributes List of link attributes when the object is on the "from" side.
dimensions

object: {
"x": float,
"y": float,
"z": float
}

Default XYZ dimensions of a new cuboid. Only valid in the point cloud cuboid editor (see #create-a-cuboid-with-default-dimensions).
... ... Other key-value pairs can be supplied, but will be ignored.

Attribute

{
    "name": "color",
    "input_type": "select",
    "values": [
        "green",
        "yellow",
        "red"
    ],
    "default_value": "red" // optional
    "is_mandatory": true // optional
    "is_track_level: true // for sequence interfaces, optional
}
NameTypeDescription
namestringRequired. Name of the attribute.
input_typestring: select | text | number | checkboxRequired. Type of the attribute.
valuesarray of stringsRequired when input_type is select. List of possible values.
minstringValid when input_type is number. Minimum value the attribute can be.
maxstringValid when input_type is number. Maximum value the attribute can be.
stepstringValid when input_type is number. Step when incrementing/decrementing the value of the attribute.
default_valuestring | boolean depending on input_typeDefault value of the attribute.
is_mandatorybooleanValid when input_type is select, text or number. Whether the attribute is mandatory. Mandatory attributes raise a warning when not filled in.
is_track_levelbooleanValid in sequence datasets. Whether an attribute should remain constant across all frames for an object with a certain track ID. If false, the attribute can change on each frame.
synced_across_sensorsbooleanValid in multi-sensor datasets. Whether an attribute should remain constant across all sensors for an object with a certain track ID. If false, the attribute can change on each sensor.
sensorsstring: 2D |3D| allValid in multi-sensor datasets. Whether an attribute applies to 2D sensors, 3D sensors, or all sensors.

Additional examples

{
    "name": "description",
    "input_type": "text",
    "default_value": "A nice car.", // optional
    "is_mandatory": true // optional
},
{
    "name": "number_of_wheels",
    "input_type": "number",
    "min": "1", // optional
    "max": "20", // optional
    "step": "1", // optional
    "default_value": 4, // optional
    "is_mandatory": true // optional
},
{
    "name": "is_electric",
    "input_type": "checkbox",
    "default_value": false // optional
}

Warning rule

Different warning rules can be configured. Each rule type can be added multiple times for different categories / category groups according to the rule specifications. Currently, the following list of options is allowed

  • intersecting-cuboids
  • cuboid-dimension-limits

Each rule has its own set of properties to fully configure it.

Intersecting cuboids

An intersecting cuboids rule should either have an excluded_set_of_categories prop or an excluded_categories prop, not both.

NameTypeDescription
namestring: intersecting-cuboidsrequired: Set this property to intersecting-cuboids when adding a rule to warn for intersecting cuboids.
excluded_set_of_categoriesarray of numbersAdd categories to this list that are allowed to intersect with each other.
Note that intersections between elements of the exact same category will still raise warnings.
excluded_categoriesarray of numbersAdd categories to this list that should not trigger warnings when they intersect with any category (including their own category).
// Activate the rule without exclusions
{
    "name": "intersecting-cuboids",
    "excluded_categories": [],
}

// Activate the rule, but exclude intersections between categories 1 and 3, 1 and 5,
// and between 3 and 5 from raising warnings
{
    "name": "intersecting-cuboids",
    "excluded_set_of_categories": [1, 3, 5],
}

// Activate the rule, but don't raise warnings when category 3 intersects
{
    "name": "intersecting-cuboids",
    "excluded_categories": [3],
}

Cuboid dimension limits

An intersecting cuboids rule should either have an excluded_set_of_categories prop or an excluded_categories prop, not both.

NameTypeDescription
namestring: cuboid-dimension-limitsrequired: Set this property to cuboid-dimension-limits when adding a rule to warn for invalid dimensions on cuboids.
categoriesarray of numbersAdd categories to this list for which this rule should apply.
Pass an empty array to apply this rule to all categories.
minobject: {
"x": float | undefined,
"y": float | undefined,
"z": float | undefined
}
Set the minimum dimensions allowed for cuboids.
It is not required to set all x, y and z values. Only set the values that you want to be warned for.
maxobject: {
"x": float | undefined,
"y": float | undefined,
"z": float | undefined
}
Set the maximum dimensions allowed for cuboids.
It is not required to set all x, y and z values. Only set the values that you want to be warned for.
// Activate the rule and warn for any cuboid with an x value larger than 10
{
    "name": "cuboid-dimension-limits",
    "max" {
        "x": 10
    }
}

// Activate the rule and warn for any cuboid in category 1 or 2
// with an x or y value smaller than or a z value larger than 3
{
    "name": "cuboid-dimension-limits",
    "categories": [1, 2],
    "min": {
        "x": 0.5,
        "y": 0.5
    },
    "max" {
        "x": 3
    }
}

{% hint style="warning" %} Note that the inline comments in the examples should be left out, as comments of the form//… or /*…*/ are not allowed in JSON. {% endhint %}