contexts

A context under the frames represents context information on this frame, such as weather, city, or daytime in the real world. A context key is composed of various pieces of information, including the context's name, type, and annotation location (like a bounding box location array). Each key uses a unique UUID as its identifier.

The dynamic information related to an object, denoted by ${CONTEXT_UUID}, is described under a specific frame. This information encompasses data that changes over time, such as the location, velocity, and orientation of the object within the scene.

How to use?

In VisionAI format, the "contexts" is mainly used for classification and tagging information. The reason for distinguishing between the two is to inform the Dataverse system which information should be used for model training (classification) and which information is used for data management (tagging).

Schema

Example

"contexts": {
    "7e89b4be-be4a-11ed-afa1-0242ac120002": {
        "context_data": {
            "vec": [{
                    "name": "weather",
                    "val": ["sunny", "rainy", "cloudy"],
                    "stream": "camera1",
                    "attributes": {
                        "vec": [{
                                "name": "probability",
                                "val": [0.78, 0.12, 0.1]
                        }]
                    }
            }],
            "num": [{
                    "name": "temperature",
                    "val": 27,
                    "stream": "camera1"
            }],
        }
    }, //Place the items that need to participate in model training, such as classification categories and their corresponding prediction probabilities.
    "d4af429c-c173-11ed-afa1-0242ac120002": {
        "context_data": {
            "num": [{
                    "name": "image_size",
                    "val": "Taipei",
                    "stream": "camera1"
            }]
        }
    }, //For tagging purposes, include any other items that do not need to participate in model training.
    "93b543d0-be4a-11ed-afa1-0242ac120002": { ... }
}

contexts {}

namedescriptiontyperequired

${CONTEXT_UUID}

The id of the context. It uses UUID32 as a key.

object

true, unique

context_data

It refers to information used to describe a particular object such as annotation shapes, attributes, or metrics.

The ${OBJECT_TYPE} can be found in the accompanying documentation: ➤ text ➤ vec ➤ boolean ➤ number

object

true

About “Tagging

Please note that the system only recognizes tags present in the ground truth data and does not read tags from other annotation sources. If you require specific tags to be associated with your data and displayed on the platform, please ensure they are included in your ground truth annotations.

context_data {}

namedescriptiontyperequired

boolean

The boolean type attribute means a result that can only have one of two possible values: true or false.

array of objects

false

number

The number type attribute defines a floating-point number and is defined by a name key, and val key.

array of objects

false

text

The text type attribute is a string to represent textual information.

array of objects

false

vec

The vec type attribute is an array of text. It represents the options of the attribute and possibly has the same properties as the other generic attributes.

array of objects

false

context_type

namedescriptiontyperequired

name

The name of this attribute.

string

true

val

The value of this attribute follows the table defined above. ➤ boolean: boolean ➤ number: float ➤ text: string ➤ vec: array of strings

in the description

true

stream

Represents which stream this shape is on.

string

true

attributes

attributes this context has. For example in classification, to describe t

object

false


Use Case

Classification

To describe a classification dataset with one camera sensor:

  • sensor: camera (#camera1)

  • ontology

    • gender (vec): female, male

    • age (vec): child or adult

Example Code

pageclassification

Tagging

To describe a dataset with taggings:

  • sensor: camera (#camera1)

  • tagging

    • weather (vec): sunny, cloudy, rainy, snowy, foggy

    • timeofday (vec): daytime, night, DawnDusk

    • scene (vec): tunnel, residential, parkingLot, cityStreet, gasStations, highway

    • Inroom: boolean

    • imagesize: num

    • note: text (static info)

pagetagging

Last updated