From 130f7964db823d1a85c06ec8b8a144358a95a618 Mon Sep 17 00:00:00 2001 From: "chris.ochoa" Date: Thu, 1 Aug 2024 07:08:30 +0000 Subject: [PATCH 1/3] fix: fix conversion in key point 3d --- dgp/utils/structures/key_point_3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgp/utils/structures/key_point_3d.py b/dgp/utils/structures/key_point_3d.py index b2ce80c8..3a03c5df 100644 --- a/dgp/utils/structures/key_point_3d.py +++ b/dgp/utils/structures/key_point_3d.py @@ -91,4 +91,4 @@ def to_proto(self): KeyPoint3D.pb2 As defined in `proto/annotations.proto` """ - return annotations_pb2.KeyPoint3D(x=int(self.x), y=int(self.y), z=int(self.z)) + return annotations_pb2.KeyPoint3D(x=float(self.x), y=float(self.y), z=float(self.z)) From 260f5e54df01c47009e81da38705f61cff263b64 Mon Sep 17 00:00:00 2001 From: "chris.ochoa" Date: Thu, 1 Aug 2024 17:24:29 +0000 Subject: [PATCH 2/3] fix: also update keyline 3d --- dgp/utils/structures/key_line_3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgp/utils/structures/key_line_3d.py b/dgp/utils/structures/key_line_3d.py index 694ce4ca..787b626f 100644 --- a/dgp/utils/structures/key_line_3d.py +++ b/dgp/utils/structures/key_line_3d.py @@ -95,6 +95,6 @@ def to_proto(self): As defined in `proto/annotations.proto` """ return [ - annotations_pb2.KeyPoint3D(x=int(self.x[j]), y=int(self.y[j]), z=int(self.z[j])) + annotations_pb2.KeyPoint3D(x=float(self.x[j]), y=float(self.y[j]), z=float(self.z[j])) for j, _ in enumerate(self.x) ] From 235b9e3107fcdbe0c3daed2656f25ca9a19af0ea Mon Sep 17 00:00:00 2001 From: "chris.ochoa" Date: Tue, 6 Aug 2024 04:44:34 +0000 Subject: [PATCH 3/3] fix: update test --- tests/annotation/test_key_line_3d_annotation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/annotation/test_key_line_3d_annotation.py b/tests/annotation/test_key_line_3d_annotation.py index c41bb1e0..f87d8d15 100644 --- a/tests/annotation/test_key_line_3d_annotation.py +++ b/tests/annotation/test_key_line_3d_annotation.py @@ -35,7 +35,7 @@ def test_kl3d_annotation(kl_ontology): def test_kl3d_load(kl_ontology): DGP_TEST_DATASET_DIR = os.path.join(TEST_DATA_DIR, "dgp") - expected_output = "ac354" + expected_output = "a28b1" scenes_dataset_json = os.path.join( DGP_TEST_DATASET_DIR, "key_line_3d/scene_000000/key_line_3d/lcm_25tm/000000000000000005_21e2436af96fb6388eb0c64cc029cfdc928a3e95.json" @@ -63,6 +63,6 @@ def test_kl3d_save(kl_ontology): ) kl3d_list = KeyLine3DAnnotationList.load(scenes_dataset_json, kl_ontology) kl3d_list.save(".") - filepath = "./ac35449091ebdd374aaa743be74794db561ec86a.json" + filepath = "./a28b1cd7793c14d5ddae40d6a2065576f9856976.json" assert os.path.exists(filepath) os.remove(filepath)