Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/universal_devkit/scripts/supervisely_3d_to_universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ def convert_supervisely_3d_to_universal(input_directory, output_directory):

input_data = read_json(filepath)

objectkey2class = {}
for object in input_data["objects"]:
object_key = object["key"]
class_label = object["classTitle"]
objectkey2class[object_key] = class_label

output_data = []
for figure in input_data["figures"]:
ann = {}
Expand Down Expand Up @@ -52,6 +58,8 @@ def convert_supervisely_3d_to_universal(input_directory, output_directory):
figure_geometry["rotation"]["z"],
]

ann["class_label"] = objectkey2class[figure["objectKey"]]

ann["prev"] = ""
ann["next"] = ""
ann["num_lidar"] = 0
Expand Down