Skip to content

Commit

Permalink
feat: add JSONObject
Browse files Browse the repository at this point in the history
  • Loading branch information
unexcellent committed Oct 30, 2024
1 parent fb1880b commit 2df4b77
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions raillabel/json_format/object.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

from pydantic import BaseModel

from .element_data_pointer import JSONElementDataPointer
from .frame_interval import JSONFrameInterval


class JSONObject(BaseModel):
"""An object is the main type of annotation element.
Object is designed to represent spatiotemporal entities, such as physical objects in the real
world. Objects shall have a name and type. Objects may have static and dynamic data. Objects
are the only type of elements that may have geometric data, such as bounding boxes, cuboids,
polylines, images, etc.
"""

name: str
"Name of the object. It is a friendly name and not used for indexing."

type: str
"The type of an object defines the class the object corresponds to."

frame_intervals: list[JSONFrameInterval] | None
"The array of frame intervals where this object exists or is defined."

object_data_pointers: dict[str, JSONElementDataPointer] | None

0 comments on commit 2df4b77

Please sign in to comment.