From fd371777a496cd971fb35750f47f778fd50613f5 Mon Sep 17 00:00:00 2001 From: vinlemon Date: Wed, 17 Jul 2024 22:22:35 +0200 Subject: [PATCH] Fix face landmark model URL and adjust model resource check Signed-off-by: vinlemon --- scripts/download-models.sh | 2 +- src/tasks/vision/face_landmark/builder.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/download-models.sh b/scripts/download-models.sh index 1b4e78d..ab1eb4a 100755 --- a/scripts/download-models.sh +++ b/scripts/download-models.sh @@ -131,7 +131,7 @@ face_landmark_init() { mkdir -p "${face_landmark_dir}" pushd "${face_landmark_dir}" - model_urls=("https://storage.googleapis.com/mediapipe-assets/face_landmark.tflite" + model_urls=("https://storage.googleapis.com/mediapipe-tasks/face_landmarker/face_landmarker.task" ) for url in "${model_urls[@]}"; do diff --git a/src/tasks/vision/face_landmark/builder.rs b/src/tasks/vision/face_landmark/builder.rs index 3ce1941..f0476aa 100644 --- a/src/tasks/vision/face_landmark/builder.rs +++ b/src/tasks/vision/face_landmark/builder.rs @@ -72,7 +72,7 @@ impl FaceLandmarkerBuilder { let model_resource = crate::model::parse_model(landmark_file.as_ref())?; // check model - model_base_check_impl!(model_resource, 1, 3); + model_base_check_impl!(model_resource, 1, 2); model_resource_check_and_get_impl!(model_resource, to_tensor_info, 0).try_to_image()?; let input_tensor_type = model_resource_check_and_get_impl!(model_resource, input_tensor_type, 0);