medical
AleksanderObuchowski's picture
Add files using upload-large-folder tool
5ceacbc verified
raw
history blame contribute delete
346 Bytes
_image_encoders = {}
def register_image_encoder(fn):
module_name_split = fn.__module__.split('.')
model_name = module_name_split[-1]
_image_encoders[model_name] = fn
return fn
def image_encoders(model_name):
return _image_encoders[model_name]
def is_image_encoder(model_name):
return model_name in _image_encoders