From 8aca21cd44e8cdbb0692867f5c71ba1f6f1ac0fd Mon Sep 17 00:00:00 2001 From: Sidharth Hulyalkar Date: Thu, 14 Dec 2023 17:56:21 -0600 Subject: [PATCH] modify to use model_id from key --- element_facemap/facemap_inference.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/element_facemap/facemap_inference.py b/element_facemap/facemap_inference.py index 2014912..c107c44 100644 --- a/element_facemap/facemap_inference.py +++ b/element_facemap/facemap_inference.py @@ -384,13 +384,9 @@ def make(self, key): bbox = (FacemapPoseEstimationTask & key).fetch1("bbox") or [] - # Model Name of interest should be specified by user during facemap task params manual update - model_id = (FacemapPoseEstimationTask & key).fetch("model_id") - - # Fetch model(.pt) file attachment to present working directory - facemap_model_name = (FacemapModel.File & f'model_id="{model_id}"').fetch1( - "model_file" - ) + facemap_model_name = ( + FacemapModel.File & f'model_id="{key["model_id"]}"' + ).fetch1("model_file") facemap_model_path = Path.cwd() / facemap_model_name models_root_dir = model_loader.get_models_dir()