From 6bec4455d1d5eb5da599ff0b12293d84fce1170e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 18 Oct 2023 13:49:21 +0200 Subject: [PATCH] fix some imports --- happypose/pose_estimators/cosypose/cosypose/datasets/bop.py | 2 +- .../pose_estimators/cosypose/cosypose/datasets/pose_dataset.py | 2 +- .../cosypose/cosypose/rendering/bullet_scene_renderer.py | 2 +- .../cosypose/cosypose/scripts/run_cosypose_eval.py | 2 +- happypose/pose_estimators/cosypose/cosypose/simulator/body.py | 3 ++- .../pose_estimators/cosypose/cosypose/simulator/camera.py | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/happypose/pose_estimators/cosypose/cosypose/datasets/bop.py b/happypose/pose_estimators/cosypose/cosypose/datasets/bop.py index fce75a77..e94fcff8 100644 --- a/happypose/pose_estimators/cosypose/cosypose/datasets/bop.py +++ b/happypose/pose_estimators/cosypose/cosypose/datasets/bop.py @@ -9,8 +9,8 @@ from PIL import Image from happypose.pose_estimators.cosypose.cosypose.config import BOP_TOOLKIT_DIR, MEMORY -from happypose.pose_estimators.cosypose.cosypose.lib3d import Transform from happypose.pose_estimators.cosypose.cosypose.utils.logging import get_logger +from happypose.toolbox.lib3d.transform import Transform sys.path.append(str(BOP_TOOLKIT_DIR)) from bop_toolkit_lib import inout # noqa diff --git a/happypose/pose_estimators/cosypose/cosypose/datasets/pose_dataset.py b/happypose/pose_estimators/cosypose/cosypose/datasets/pose_dataset.py index 110fc7ae..2ceb6722 100644 --- a/happypose/pose_estimators/cosypose/cosypose/datasets/pose_dataset.py +++ b/happypose/pose_estimators/cosypose/cosypose/datasets/pose_dataset.py @@ -5,7 +5,7 @@ import torch from happypose.pose_estimators.cosypose.cosypose.config import LOCAL_DATA_DIR -from happypose.pose_estimators.cosypose.cosypose.lib3d import invert_T +from happypose.pose_estimators.cosypose.cosypose.lib3d.transform_ops import invert_T from .augmentations import ( CropResizeToAspectAugmentation, diff --git a/happypose/pose_estimators/cosypose/cosypose/rendering/bullet_scene_renderer.py b/happypose/pose_estimators/cosypose/cosypose/rendering/bullet_scene_renderer.py index 4084180e..8e7c46c4 100644 --- a/happypose/pose_estimators/cosypose/cosypose/rendering/bullet_scene_renderer.py +++ b/happypose/pose_estimators/cosypose/cosypose/rendering/bullet_scene_renderer.py @@ -4,10 +4,10 @@ from happypose.pose_estimators.cosypose.cosypose.datasets.datasets_cfg import ( make_urdf_dataset, ) -from happypose.pose_estimators.cosypose.cosypose.lib3d import Transform from happypose.pose_estimators.cosypose.cosypose.simulator.base_scene import BaseScene from happypose.pose_estimators.cosypose.cosypose.simulator.caching import BodyCache from happypose.pose_estimators.cosypose.cosypose.simulator.camera import Camera +from happypose.toolbox.lib3d.transform import Transform class BulletSceneRenderer(BaseScene): diff --git a/happypose/pose_estimators/cosypose/cosypose/scripts/run_cosypose_eval.py b/happypose/pose_estimators/cosypose/cosypose/scripts/run_cosypose_eval.py index 45451794..848bf112 100644 --- a/happypose/pose_estimators/cosypose/cosypose/scripts/run_cosypose_eval.py +++ b/happypose/pose_estimators/cosypose/cosypose/scripts/run_cosypose_eval.py @@ -50,7 +50,6 @@ from happypose.pose_estimators.cosypose.cosypose.integrated.pose_predictor import ( CoarseRefinePosePredictor, ) -from happypose.pose_estimators.cosypose.cosypose.lib3d import Transform from happypose.pose_estimators.cosypose.cosypose.lib3d.rigid_mesh_database import ( MeshDataBase, ) @@ -68,6 +67,7 @@ init_distributed_mode, ) from happypose.pose_estimators.cosypose.cosypose.utils.logging import get_logger +from happypose.toolbox.lib3d.transform import Transform logger = get_logger(__name__) diff --git a/happypose/pose_estimators/cosypose/cosypose/simulator/body.py b/happypose/pose_estimators/cosypose/cosypose/simulator/body.py index 266eea58..2fb9d29e 100644 --- a/happypose/pose_estimators/cosypose/cosypose/simulator/body.py +++ b/happypose/pose_estimators/cosypose/cosypose/simulator/body.py @@ -2,7 +2,8 @@ import pybullet as pb -from happypose.pose_estimators.cosypose.cosypose.lib3d import Transform, parse_pose_args +from happypose.pose_estimators.cosypose.cosypose.lib3d.transform import parse_pose_args +from happypose.toolbox.lib3d.transform import Transform from .client import BulletClient diff --git a/happypose/pose_estimators/cosypose/cosypose/simulator/camera.py b/happypose/pose_estimators/cosypose/cosypose/simulator/camera.py index dbcd4c05..7cd2b287 100644 --- a/happypose/pose_estimators/cosypose/cosypose/simulator/camera.py +++ b/happypose/pose_estimators/cosypose/cosypose/simulator/camera.py @@ -2,8 +2,8 @@ import pybullet as pb import transforms3d -from happypose.pose_estimators.cosypose.cosypose.lib3d import Transform from happypose.pose_estimators.cosypose.cosypose.lib3d.rotations import euler2quat +from happypose.toolbox.lib3d.transform import Transform def proj_from_K(K, h, w, near, far):