nicetoolbox.evaluation.data.loaders.AnnotationLoader

class nicetoolbox.evaluation.data.loaders.AnnotationLoader(path_to_annotations: Path)[source]

Bases: object

Lazily loads a single ground truth data slice from a NPZ archive. Uses an LRU cache to optimize access to internal arrays.

Methods

close_files

Clears the LRU cache.

load_full_array

Loads a full data array from within the single annotation NPZ.

close_files()[source]

Clears the LRU cache.

load_full_array(data_key: str) ndarray | None[source]

Loads a full data array from within the single annotation NPZ.

Parameters:

data_key – The key for the data array within the npz file (e.g.,

Returns:

The full numpy array or None if the key does not exist.