def _download_oss_objectron_models(objectron_model: str):
    """Downloads the objectron models from the MediaPipe Github repo if they don't exist in the package."""

    download_utils.download_oss_model(
        'mediapipe/modules/objectron/object_detection_ssd_mobilenetv2_oidv4_fp16.tflite'
    )
    download_utils.download_oss_model(objectron_model)
Exemplo n.º 2
0
def _download_oss_pose_landmark_model(model_complexity):
    """Downloads the pose landmark lite/heavy model from the MediaPipe Github repo if it doesn't exist in the package."""

    if model_complexity == 0:
        download_utils.download_oss_model(
            'mediapipe/modules/pose_landmark/pose_landmark_lite.tflite')
    elif model_complexity == 2:
        download_utils.download_oss_model(
            'mediapipe/modules/pose_landmark/pose_landmark_heavy.tflite')