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
ModelZoo
ResNet50_tensorflow
Commits
39704281
Commit
39704281
authored
Jun 12, 2019
by
Erekle
Committed by
aquariusjay
Jun 12, 2019
Browse files
Fixed UnicodeDecodeError error (#7006)
parent
ce03903f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/deeplab/datasets/build_ade20k_data.py
research/deeplab/datasets/build_ade20k_data.py
+2
-2
No files found.
research/deeplab/datasets/build_ade20k_data.py
View file @
39704281
...
@@ -91,11 +91,11 @@ def _convert_dataset(dataset_split, dataset_dir, dataset_label_dir):
...
@@ -91,11 +91,11 @@ def _convert_dataset(dataset_split, dataset_dir, dataset_label_dir):
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
# Read the image.
# Read the image.
image_filename
=
img_names
[
i
]
image_filename
=
img_names
[
i
]
image_data
=
tf
.
gfile
.
FastGFile
(
image_filename
,
'r'
).
read
()
image_data
=
tf
.
gfile
.
FastGFile
(
image_filename
,
'r
b
'
).
read
()
height
,
width
=
image_reader
.
read_image_dims
(
image_data
)
height
,
width
=
image_reader
.
read_image_dims
(
image_data
)
# Read the semantic segmentation annotation.
# Read the semantic segmentation annotation.
seg_filename
=
seg_names
[
i
]
seg_filename
=
seg_names
[
i
]
seg_data
=
tf
.
gfile
.
FastGFile
(
seg_filename
,
'r'
).
read
()
seg_data
=
tf
.
gfile
.
FastGFile
(
seg_filename
,
'r
b
'
).
read
()
seg_height
,
seg_width
=
label_reader
.
read_image_dims
(
seg_data
)
seg_height
,
seg_width
=
label_reader
.
read_image_dims
(
seg_data
)
if
height
!=
seg_height
or
width
!=
seg_width
:
if
height
!=
seg_height
or
width
!=
seg_width
:
raise
RuntimeError
(
'Shape mismatched between image and label.'
)
raise
RuntimeError
(
'Shape mismatched between image and label.'
)
...
...
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