surveilling-surveillance/detection/models/__init__.py

15 lines
317 B
Python
Raw Permalink Normal View History

2021-05-20 20:20:48 +00:00
import argparse
from util import Args
from .classification import *
from .detection import *
def get_model(model_args):
model_args_ = model_args
if isinstance(model_args, argparse.Namespace):
model_args_ = Args(vars(model_args))
return globals().copy()[model_args_.get("model")](model_args_)