mirror of
https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once.git
synced 2025-06-03 14:50:11 +08:00
12 lines
345 B
Python
12 lines
345 B
Python
|
from .registry import model_entrypoints
|
||
|
from .registry import is_model
|
||
|
|
||
|
from .seem import *
|
||
|
|
||
|
def build_decoder(config, *args, **kwargs):
|
||
|
model_name = config['MODEL']['DECODER']['NAME']
|
||
|
|
||
|
if not is_model(model_name):
|
||
|
raise ValueError(f'Unkown model: {model_name}')
|
||
|
|
||
|
return model_entrypoints(model_name)(config, *args, **kwargs)
|