Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
mmdetection3d
Commits
edc468bf
Unverified
Commit
edc468bf
authored
Dec 27, 2022
by
ZLTJohn
Committed by
GitHub
Dec 27, 2022
Browse files
[Fix] Fix numpy ValueError in update_infos_to_v2.py (#2162)
parent
5e2fa8ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tools/dataset_converters/update_infos_to_v2.py
tools/dataset_converters/update_infos_to_v2.py
+4
-4
No files found.
tools/dataset_converters/update_infos_to_v2.py
View file @
edc468bf
...
...
@@ -305,7 +305,7 @@ def update_nuscenes_infos(pkl_path, out_dir):
rot
=
ori_sweep
[
'sensor2lidar_rotation'
]
trans
=
ori_sweep
[
'sensor2lidar_translation'
]
lidar2sensor
[:
3
,
:
3
]
=
rot
.
T
lidar2sensor
[:
3
,
3
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
lidar2sensor
[:
3
,
3
:
4
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
temp_lidar_sweep
[
'lidar_points'
][
'lidar2sensor'
]
=
lidar2sensor
.
astype
(
np
.
float32
).
tolist
()
temp_lidar_sweep
[
'timestamp'
]
=
ori_sweep
[
'timestamp'
]
/
1e6
...
...
@@ -333,7 +333,7 @@ def update_nuscenes_infos(pkl_path, out_dir):
rot
=
ori_info_dict
[
'cams'
][
cam
][
'sensor2lidar_rotation'
]
trans
=
ori_info_dict
[
'cams'
][
cam
][
'sensor2lidar_translation'
]
lidar2sensor
[:
3
,
:
3
]
=
rot
.
T
lidar2sensor
[:
3
,
3
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
lidar2sensor
[:
3
,
3
:
4
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
empty_img_info
[
'lidar2cam'
]
=
lidar2sensor
.
astype
(
np
.
float32
).
tolist
()
temp_data_info
[
'images'
][
cam
]
=
empty_img_info
...
...
@@ -786,7 +786,7 @@ def update_lyft_infos(pkl_path, out_dir):
rot
=
ori_sweep
[
'sensor2lidar_rotation'
]
trans
=
ori_sweep
[
'sensor2lidar_translation'
]
lidar2sensor
[:
3
,
:
3
]
=
rot
.
T
lidar2sensor
[:
3
,
3
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
lidar2sensor
[:
3
,
3
:
4
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
temp_lidar_sweep
[
'lidar_points'
][
'lidar2sensor'
]
=
lidar2sensor
.
astype
(
np
.
float32
).
tolist
()
# bc-breaking: Timestamp has divided 1e6 in pkl infos.
...
...
@@ -814,7 +814,7 @@ def update_lyft_infos(pkl_path, out_dir):
rot
=
ori_info_dict
[
'cams'
][
cam
][
'sensor2lidar_rotation'
]
trans
=
ori_info_dict
[
'cams'
][
cam
][
'sensor2lidar_translation'
]
lidar2sensor
[:
3
,
:
3
]
=
rot
.
T
lidar2sensor
[:
3
,
3
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
lidar2sensor
[:
3
,
3
:
4
]
=
-
1
*
np
.
matmul
(
rot
.
T
,
trans
.
reshape
(
3
,
1
))
empty_img_info
[
'lidar2cam'
]
=
lidar2sensor
.
astype
(
np
.
float32
).
tolist
()
temp_data_info
[
'images'
][
cam
]
=
empty_img_info
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment