pyiqa.utils.registry

Module Contents

class pyiqa.utils.registry.Registry(name)[source]

The registry that provides name -> object mapping, to support third-party users’ custom modules.

To create a registry (e.g. a backbone registry):

BACKBONE_REGISTRY = Registry('BACKBONE')

To register an object:

@BACKBONE_REGISTRY.register()
class MyBackbone():
    ...

Or:

BACKBONE_REGISTRY.register(MyBackbone)
register(obj=None)[source]

Register the given object under the the name obj.__name__. Can be used as either a decorator or not. See docstring of this class for usage.

get(name)[source]
keys()[source]
pyiqa.utils.registry.DATASET_REGISTRY[source]
pyiqa.utils.registry.ARCH_REGISTRY[source]
pyiqa.utils.registry.MODEL_REGISTRY[source]
pyiqa.utils.registry.LOSS_REGISTRY[source]
pyiqa.utils.registry.METRIC_REGISTRY[source]