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.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.1.1.tar.gz (33.6 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.1.1-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kognic_openlabel-2.1.1.tar.gz
  • Upload date:
  • Size: 33.6 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.1.1.tar.gz
Algorithm Hash digest
SHA256 b817043c62fba93355bc07802df487b2fa6948d97435cd1031bff7bfa0b6af6b
MD5 01e71257c9a0c16a5c8c90bad51e5925
BLAKE2b-256 6b7fde7b854e5f74c7726efdb1b22baea211544e9fe3679bf1f00c40c093afc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for kognic_openlabel-2.1.1.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.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for kognic_openlabel-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e66dde745aa41084b93eee302aca41d0736b31ca07a09e8fb8b43a2fec70db20
MD5 113d2e267fde2cbcaa9c63b2f7b2874c
BLAKE2b-256 2e16910b6ce951a8e6b2efe7fd63d279c82f708d9b53779d85181f6b28b35b02

See more details on using hashes here.

Provenance

The following attestation bundles were made for kognic_openlabel-2.1.1-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

2.2.0

2 files

This release

2.1.1 This release

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