(anno_cfg)
| 343 | |
| 344 | |
| 345 | def get_annotator_instance(anno_cfg): |
| 346 | import vace.annotators as annotators |
| 347 | anno_cfg = copy.deepcopy(anno_cfg) |
| 348 | class_name = anno_cfg.pop("NAME") |
| 349 | input_params = anno_cfg.pop("INPUTS") |
| 350 | output_params = anno_cfg.pop("OUTPUTS") |
| 351 | anno_ins = getattr(annotators, class_name)(cfg=anno_cfg) |
| 352 | return {"inputs": input_params, "outputs": output_params, "anno_ins": anno_ins} |
| 353 | |
| 354 | def get_annotator(config_type='', config_task='', return_dict=True): |
| 355 | anno_dict = None |