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
4d5a7fe7
Commit
4d5a7fe7
authored
Nov 03, 2022
by
Jingwei Zhang
Committed by
ZwwWayne
Dec 03, 2022
Browse files
[Fix]: fix image conversion of Waymo to avoid information loss (#1979)
parent
1187eef9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
tools/dataset_converters/waymo_converter.py
tools/dataset_converters/waymo_converter.py
+2
-3
No files found.
tools/dataset_converters/waymo_converter.py
View file @
4d5a7fe7
...
...
@@ -12,7 +12,6 @@ except ImportError:
from
glob
import
glob
from
os.path
import
join
import
mmcv
import
mmengine
import
numpy
as
np
import
tensorflow
as
tf
...
...
@@ -162,8 +161,8 @@ class Waymo2KITTI(object):
img_path
=
f
'
{
self
.
image_save_dir
}{
str
(
img
.
name
-
1
)
}
/'
+
\
f
'
{
self
.
prefix
}{
str
(
file_idx
).
zfill
(
3
)
}
'
+
\
f
'
{
str
(
frame_idx
).
zfill
(
3
)
}
.jpg'
img
=
mmcv
.
imfrombytes
(
img
.
image
)
mmcv
.
im
write
(
img
,
img_path
)
with
open
(
img_path
,
'wb'
)
as
fp
:
fp
.
write
(
img
.
image
)
def
save_calib
(
self
,
frame
,
file_idx
,
frame_idx
):
"""Parse and save the calibration data.
...
...
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