Commit 4d5a7fe7 authored by Jingwei Zhang's avatar Jingwei Zhang Committed by ZwwWayne
Browse files

[Fix]: fix image conversion of Waymo to avoid information loss (#1979)

parent 1187eef9
...@@ -12,7 +12,6 @@ except ImportError: ...@@ -12,7 +12,6 @@ except ImportError:
from glob import glob from glob import glob
from os.path import join from os.path import join
import mmcv
import mmengine import mmengine
import numpy as np import numpy as np
import tensorflow as tf import tensorflow as tf
...@@ -162,8 +161,8 @@ class Waymo2KITTI(object): ...@@ -162,8 +161,8 @@ class Waymo2KITTI(object):
img_path = f'{self.image_save_dir}{str(img.name - 1)}/' + \ img_path = f'{self.image_save_dir}{str(img.name - 1)}/' + \
f'{self.prefix}{str(file_idx).zfill(3)}' + \ f'{self.prefix}{str(file_idx).zfill(3)}' + \
f'{str(frame_idx).zfill(3)}.jpg' f'{str(frame_idx).zfill(3)}.jpg'
img = mmcv.imfrombytes(img.image) with open(img_path, 'wb') as fp:
mmcv.imwrite(img, img_path) fp.write(img.image)
def save_calib(self, frame, file_idx, frame_idx): def save_calib(self, frame, file_idx, frame_idx):
"""Parse and save the calibration data. """Parse and save the calibration data.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment