"docs/vscode:/vscode.git/clone" did not exist on "660305c38aed68437a16ac3acc383a9a3612f44e"
Unverified Commit 1cf0a85b authored by liangxiao05's avatar liangxiao05 Committed by GitHub
Browse files

Update create_pascal_tf_record.py

when creat a tf record using purely negative images which have no 'object' in their xmls ,the script gets a key error : for obj in data['object']:  Key Error : 'object'
In order to fix this , add a 'if ' judegement before it .
parent aeb8cfcb
......@@ -104,6 +104,8 @@ def dict_to_tf_example(data,
truncated = []
poses = []
difficult_obj = []
if data.has_key('object'):
for obj in data['object']:
difficult = bool(int(obj['difficult']))
if ignore_difficult_instances and difficult:
......
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