def load_pytorch(model_name: str, device: str):
    """loads the pytorch based object detector

    Args:
        model_name (str): _description_
        device (str): _description_

    Raises:
        RuntimeError: _description_

    Returns:
        _type_: _description_
    """
    if model_name in ('frcnn', 'faster_rcnn'):
        model, preprocess = load_pytorch_rcnn()
        model = model.to(device)
        model.eval()
    else:
        raise RuntimeError("incorrect model specified")

    return model, preprocess
loads the pytorch based object detector

    Args:
        model_name (str): _description_
        device (str): _description_

    Raises:
        RuntimeError: _description_

    Returns:
        _type_: _description_
    
src/marqo/s2_inference/processing/pytorch_utils.py