function

states.gallery_state_entries

def gallery_state_entries(field: str, dim: int, capacity: int = 8, meas_field: str | None = None) -> dict[str, State]

Build the ``(recent, gallery, count)`` state entries for a feature bank.

Pair the gallery with :class:`~unitrack.costs.GalleryCost` (reading ``f"{field}_gallery"`` and ``f"{field}_count"``) for memory-bank matching, or match the primary ``field`` with plain :class:`~unitrack.costs.Cosine` for last-embedding matching.

Parameters

NameTypeDescription
fieldstrName of the primary (most-recent) field and prefix for the ``f"{field}_gallery"`` / ``f"{field}_count"`` auxiliaries.
dimintEmbedding dimensionality.
capacity = 8intNumber of gallery slots ``K``.
meas_field = NonestrDetection field supplying the embedding. Defaults to :paramref:`field`.

Returns

dict — Three :class:`~unitrack.states.State` entries keyed by ``field``, ``f"{field}_gallery"`` and ``f"{field}_count"``.

Source: unitrack/states/gallery.py:139