DOWNLOAD ANNOTATIONS
Indepth theory
kognic-openlabel
1min
using this openlabel json schema we have created a python package kognic openlabel https //pypi org/project/kognic openlabel which makes it easier to work with annotations the python models the openlabel format as pydantic models and can be installed with pip install upgrade kognic openlabel since pydantic is used, the model contains validation as well as methods for serialization and deserialization below are examples of how you can easily change between different formats openlabel dict = { "openlabel" { "metadata" { "schema version" "1 0 0" } } } from kognic openlabel models import openlabelannotation \# deserialize dict openlabel annotation = openlabelannotation model validate(openlabel dict) \# serialize to json openlabel json = openlabel annotation model dump json(exclude none=true) \# deserialize json openlabel annotation = openlabelannotation model validate json(openlabel json) \# serialize to dict openlabel dict = openlabel annotation model dump(exclude none=true)