From b3f12a3249e7f985bba5ac69c7336194691c1511 Mon Sep 17 00:00:00 2001 From: JP+ <63192177+joachimpoutaraud@users.noreply.github.com> Date: Sun, 20 Mar 2022 19:14:48 +0100 Subject: [PATCH] Update centerface.py --- musicalgestures/_centerface.py | 7 ++++++- setup.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/musicalgestures/_centerface.py b/musicalgestures/_centerface.py index c9edc01..cd04d87 100644 --- a/musicalgestures/_centerface.py +++ b/musicalgestures/_centerface.py @@ -1,12 +1,17 @@ +import os import cv2 import numpy as np +import musicalgestures + class CenterFace(object): def __init__(self, landmarks=True): + module_path = os.path.abspath(os.path.dirname(musicalgestures.__file__)) + self.landmarks = landmarks - self.net = cv2.dnn.readNetFromONNX('./models/centerface.onnx') + self.net = cv2.dnn.readNetFromONNX(module_path + 'models/centerface.onnx') self.img_h_new, self.img_w_new, self.scale_h, self.scale_w = 0, 0, 0, 0 def __call__(self, img, height, width, threshold=0.5): diff --git a/setup.py b/setup.py index 7918edb..1948d53 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name='musicalgestures', packages=['musicalgestures'], - version='v1.2.11', + version='v1.2.12', license='GNU General Public License v3 (GPLv3)', description='Musical Gestures Toolbox for Python', long_description=README, @@ -23,7 +23,7 @@ author='University of Oslo fourMs Lab', author_email='a.r.jensenius@imv.uio.no', url='https://github.com/fourMs/MGT-python', - download_url='https://github.com/fourMs/MGT-python/archive/v1.2.11.tar.gz', + download_url='https://github.com/fourMs/MGT-python/archive/v1.2.12.tar.gz', keywords=['Computer Vision', 'Motion Analysis', 'Musical Gestures', 'Video-Analysis'], install_requires=[