Commit 9b7b64be authored by Marvin Teichmann's avatar Marvin Teichmann Committed by aquariusjay
Browse files

Fix bug in dataset reader. (#6871)

The ".mat" files loaded in the dataset are byte files. Python 3.7 requires them to be loaded using "rb".
parent 372ac40a
...@@ -40,7 +40,7 @@ def ReadDatasetFile(dataset_file_path): ...@@ -40,7 +40,7 @@ def ReadDatasetFile(dataset_file_path):
array of integers; additionally, it has a key 'bbx' mapping to a NumPy array of integers; additionally, it has a key 'bbx' mapping to a NumPy
array of floats with bounding box coordinates. array of floats with bounding box coordinates.
""" """
with tf.gfile.GFile(dataset_file_path, 'r') as f: with tf.gfile.GFile(dataset_file_path, 'rb') as f:
cfg = matlab.loadmat(f) cfg = matlab.loadmat(f)
# Parse outputs according to the specificities of the dataset file. # Parse outputs according to the specificities of the dataset file.
......
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