raillabel.format.frame_interval module¶
- class raillabel.format.frame_interval.FrameInterval(start: int, end: int)¶
Bases:
object
Closed interval of frames.
- classmethod from_frame_ids(frame_ids: list[int]) list[FrameInterval] ¶
Convert a list of frame uids into FrameIntervals.
Example: .. code-block:: python
- FrameInterval.from_frame_ids([0, 1, 2, 3, 9, 12, 13, 14]) == [
FrameInterval(0, 3), FrameInterval(9, 9), FrameInterval(12, 14),
]
- classmethod from_json(json: JSONFrameInterval) FrameInterval ¶
Construct an instant of this class from RailLabel JSON data.
- to_json() JSONFrameInterval ¶
Export this object into the RailLabel JSON format.