pipert.utils.visualizer.catalog¶
Module Contents¶
Classes¶
A catalog that stores information about the datasets and how to obtain them. |
|
MetadataCatalog provides access to “Metadata” of a given dataset. |
-
class
pipert.utils.visualizer.catalog.DatasetCatalog[source]¶ Bases:
objectA catalog that stores information about the datasets and how to obtain them. It contains a mapping from strings (which are names that identify a dataset, e.g. “coco_2014_train”) to a function which parses the dataset and returns the samples in the format of list[dict]. The returned dicts should be in Detectron2 Dataset format (See DATASETS.md for details) if used with the data loader functionalities in data/build.py,data/detection_transform.py. The purpose of having this catalog is to make it easy to choose different datasets, by just using the strings in the config.
-
static
register(name, func)[source]¶ Args: name (str): the name that identifies a dataset, e.g. “coco_2014_train”. func (callable): a callable which takes no arguments and returns a list of dicts.
-
static
-
class
pipert.utils.visualizer.catalog.MetadataCatalog[source]¶ MetadataCatalog provides access to “Metadata” of a given dataset. The metadata associated with a certain name is a singleton: once created, the metadata will stay alive and will be returned by future calls to get(name). It’s like global variables, so don’t abuse it. It’s meant for storing knowledge that’s constant and shared across the execution of the program, e.g.: the class names in COCO.