Skip to content

Commit

Permalink
feat: update comparing sensor index and camera index in painting
Browse files Browse the repository at this point in the history
Signed-off-by: ktro2828 <[email protected]>
  • Loading branch information
ktro2828 committed Nov 15, 2024
1 parent 10d4455 commit 181947d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion perception_dataset/deepen/segmentation/painting2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def _parse_annotation(
for image, categories in items.items():
id2category = {i + 1: name for i, name in enumerate(categories)}
camera_name = None
# NOTE: camera2index starts from 0, but deepen sensor id starts from 1.
for name, sensor_idx in camera2index.items():
if f"sensor{sensor_idx}" == sensor_id:
if f"sensor{sensor_idx + 1}" == sensor_id:
camera_name = name
if camera_name is None:
raise ValueError(f"There is no corresponding camera for {image}")
Expand Down

0 comments on commit 181947d

Please sign in to comment.