Skip to content

Annotations

def rerun.log_annotation_context(entity_path, class_descriptions, *, timeless=True)

Log an annotation context made up of a collection of ClassDescriptions.

Any entity needing to access the annotation context will find it by searching the path upward. If all entities share the same you can simply log it to the root ("/"), or if you want a per-entity ClassDescriptions log it to the same path as your entity.

Each ClassDescription must include an annotation info with an id, which will be used for matching the class and may optionally include a label and color. Colors should either be in 0-255 gamma space or in 0-1 linear space. Colors can be RGB or RGBA.

These can either be specified verbosely as:

[AnnotationInfo(id=23, label='foo', color=(255, 0, 0)), ...]

Or using short-hand tuples.

[(23, 'bar'), ...]

Unspecified colors will be filled in by the visualizer randomly.

Parameters:

Name Type Description Default
entity_path str

The path to the annotation context in the space hierarchy.

required
class_descriptions Union[ClassDescriptionLike, Iterable[ClassDescriptionLike]]

A single ClassDescription or a collection of ClassDescriptions.

required
timeless bool

If true, the annotation context will be timeless (default: True).

True