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

[Enhance] Support evaluation for waymo dataset on s3 filesystem when tensorflow>=2.6.0 (#1958)

* support tensorflow>2.6.0

* add filter conditions
parent 7036cc9f
......@@ -192,6 +192,13 @@ class KITTI2Waymo(object):
file_idx (int): Index of the file to be converted.
"""
file_pathname = self.waymo_tfrecord_pathnames[file_idx]
if 's3://' in file_pathname and tf.__version__ >= '2.6.0':
try:
import tensorflow_io as tfio # noqa: F401
except ImportError:
raise ImportError(
"Please run 'pip install tensorflow-io' to install tensorflow_io first." # noqa: E501
)
file_data = tf.data.TFRecordDataset(file_pathname, compression_type='')
for frame_num, frame_data in enumerate(file_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