Skip to main content

Kognic OpenLABEL

Installation

Install the Kognic OpenLABEL package from pip with

pip install kognic-openlabel

Serialization and deserialization

Since all models inherit from pydantic's BaseModel, serialization and deserialization from dicts or json strings are relatively straight forward.

data = {
    "openlabel": {
        "metadata": {
            "schema_version": "1.0.0"
        }
    }
}

import kognic.openlabel.models as OLM

# Deserialize dict
openlabel_annotation = OLM.OpenLabelAnnotation.model_validate(data)

# Serialize to json
json_data = openlabel_annotation.model_dump_json(exclude_none=True)

# Deserialize json
openlabel_annotation = OLM.OpenLabelAnnotation.model_validate_json(json_data)

# Serialize to dict
dict_data = openlabel_annotation.model_dump(exclude_none=True)

Further reading

https://www.asam.net/project-detail/asam-openlabel-v100/

Changelog

[2.2.0] - 2026-08-19

  • Revert Frame.frame_properties and FrameProperties.timestamp to optional (as in 2.0.x and depending on interpretation, OpenLABEL spec). Making them required in 2.1.0 broke consumers that build models incrementally or parse old exports without those fields. Compatibility note: The Kognic pre-annotation flavor of OL still requires a timestamp per frame.

[2.0.3] - 2024-07-26

  • Fix so that model_dump works correctly with ontologies

[2.0.2] - 2024-07-26

...

[2.0.1] - 2023-11-07

  • Use model_rebuild instead of deprecated update_forward_refs

[2.0.0] - 2023-11-06

  • Bump pydantic to >2

[1.0.1] - 2023-07-05

  • Pin pydantic version to <2

[1.0.0] - 2022-10-18

  • Annotell becomes Kognic

[0.1.4] - 2022-01-24

  • Improved serializability for enum classes

[0.1.3] - 2022-01-04

  • Fixed issues with version 0.1.2

[0.1.2] - 2021-12-29

  • Updated several fields with multiple types to fix issues with serialization and deserialization. For example, the coordinates on Poly2d objects were previously always parsed to strings. This update means that an attempt to parse them to floats is made. If this fails the they will be parsed to strings.

[0.1.1] - 2021-11-24

  • Updated stream properties model generation to be nicer to work with

[0.1.0] - 2021-11-18

  • Updated json schema and model to be true to the 1.0.0 release of openlabel. Previously it was based on the release-candidate

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kognic_openlabel-2.2.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kognic_openlabel-2.2.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file kognic_openlabel-2.2.0.tar.gz.

File metadata

  • Download URL: kognic_openlabel-2.2.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for kognic_openlabel-2.2.0.tar.gz
Algorithm Hash digest
SHA256 31c5dccca069c08e4b8711f21bf4c6a14f34aabf012b6b77be8013ef4d7eb9c5
MD5 cf976fba3174a9989dc4e9b12c49edfa
BLAKE2b-256 cf36306376d843a81525af52e9d236e1336350270cb306aad9289727e82e19aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for kognic_openlabel-2.2.0.tar.gz:

Publisher: python-publish.yml on annotell/kognic-openlabel-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kognic_openlabel-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for kognic_openlabel-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f262aa74a7a6e88d67e2a97489ddca59646958978784aed15a929604534b051d
MD5 bb2d4bc7c00b96e938f58c18671fe55b
BLAKE2b-256 7d5960a45a3b4c276903a6f54508dea0e27cfa36a2cc9febf1a1b4fab8ef35f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for kognic_openlabel-2.2.0-py3-none-any.whl:

Publisher: python-publish.yml on annotell/kognic-openlabel-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 files

2.1.1

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page