Closed nekulkarni closed 6 years ago
Hi Nkulkarni,
I found this issue as well. The problem is with the TensorFlow library and the solution is explained here: https://github.com/tensorflow/models/issues/3252. Unfortunately, you’ll have to patch your local copy of TensorFlow.
Here is the relevant section of the link that explains what you need to do (quote below):
I had same error with Python3.5 and TF1.5. This causes tf_example.features.feature[self.field_name].bytes_list.value returns byte type instead of string type in metrics/tf_example_parser.StringParser.
So I changed tf_example_parser.StringParser below
class StringParser(data_parser.DataToNumpyParser):
"""Tensorflow Example string parser."""
def __init__(self, field_name):
self.field_name = field_name
def parse(self, tf_example):
if tf_example.features.feature[self.field_name].HasField("bytes_list"):
result = tf_example.features.feature[self.field_name].bytes_list.value
result = "".join([x if type(x)=='str' else x.decode('utf-8') for x in result])
else:
result = None
return result
That worked. Thanks so much @svpino!
The problem has been resolved. Thanks so much @svpino .
I followed the following example given in the
README
file, while using the correct paths todetection.record
andlabel_map.pbtxt
files:However I run into an error:
I'm using python3.6 and tensorflow r1.10.
Why doesn't it work?