From d72cdef426b3eeaa321954882aa667947acae5e6 Mon Sep 17 00:00:00 2001 From: kminoda Date: Fri, 15 Dec 2023 15:59:52 +0900 Subject: [PATCH] fix(annotated_t4_to_deepen): fix file_id output Signed-off-by: kminoda --- .../deepen/annotated_t4_to_deepen_converter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/perception_dataset/deepen/annotated_t4_to_deepen_converter.py b/perception_dataset/deepen/annotated_t4_to_deepen_converter.py index a08bf5ce..ef7cce08 100644 --- a/perception_dataset/deepen/annotated_t4_to_deepen_converter.py +++ b/perception_dataset/deepen/annotated_t4_to_deepen_converter.py @@ -83,6 +83,11 @@ def _convert_one_scene(self, input_dir: str, scene_name: str): sample_data_record = nusc.get("sample_data", sample_record["data"][sensor]) file_id = osp.basename(sample_data_record["filename"]).replace(".pcd.bin", ".pcd") + + # Original T4 format names the file_id as 000000.pcd.bin for example. + # We need to convert it to 0.pcd in this case. + file_id = str(int(file_id.split('.')[0])) + '.pcd' + label_category_id = self._label_converter.convert_label(category_record["name"]) attributes_records = [