From e97f0de305466d60e4b0b8a64529e49d4df63f48 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Mon, 12 Feb 2024 12:11:06 -0500 Subject: [PATCH] Fix mediapipe load config --- hand_refiner/pipeline.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hand_refiner/pipeline.py b/hand_refiner/pipeline.py index 7c7d87e..b0c0456 100644 --- a/hand_refiner/pipeline.py +++ b/hand_refiner/pipeline.py @@ -188,7 +188,7 @@ class MeshGraphormerMediapipe(Preprocessor): mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])]) - base_options = python.BaseOptions(model_asset_path=str( Path(__file__).parent / "hand_landmarker.task" )) + base_options = python.BaseOptions(model_asset_buffer=(Path(__file__).parent / "hand_landmarker.task").read_bytes()) options = vision.HandLandmarkerOptions(base_options=base_options, min_hand_detection_confidence=0.6, min_hand_presence_confidence=0.6, diff --git a/pyproject.toml b/pyproject.toml index 9c13991..452d618 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "hatchling.build" [project] name = "handrefinerportable" readme = "README.md" -version = "2024.01.18.0" +version = "2024.02.12.0" dependencies = [ "rtree", "mediapipe",