From c68b635bac4f8e00fe8da8f87cd71c0d32b9bd7c Mon Sep 17 00:00:00 2001 From: Scott Richardson Date: Tue, 17 May 2022 16:24:19 -0400 Subject: [PATCH] import vxl.vgl.algo so vgl_rotation_3d can be loaded as a python type it is necessary to import vxl.vgl.algo in order to avoid this error from pybind11: Traceback (most recent call last): File scripts/estimate_pose_example.py, line 36, in pose = pix2face_estimation.camera_estimation.estimate_head_pose(img, pix2face_net, cuda_device) File /pix2face/python/pix2face_estimation/camera_estimation.py, line 19, in estimate_head_pose return extract_head_pose(estimate_camera(image, pix2face_net, cuda_device=cuda_device)) File /pix2face/python/pix2face_estimation/camera_estimation.py, line 14, in extract_head_pose yaw, pitch, roll = decompose_camera_rotation(camera_params.rotation.as_matrix(), pitch_offset=-7) TypeError: Unable to convert function return value to a Python type! The signature was (arg0: face3d.perspective_camera_parameters) -> vgl_rotation_3d --- python/pix2face_estimation/camera_estimation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/pix2face_estimation/camera_estimation.py b/python/pix2face_estimation/camera_estimation.py index 641c2a8..b74c91b 100644 --- a/python/pix2face_estimation/camera_estimation.py +++ b/python/pix2face_estimation/camera_estimation.py @@ -1,5 +1,6 @@ import face3d import pix2face.test +import vxl.vgl.algo from .camera_decomposition import decompose_camera_rotation