Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 76622b7

Browse files
Merge pull request #26 from vijendra1125/Issue22-bug_fix-Invalid_example
fix for issue22
2 parents 3e5f94f + 2d12591 commit 76622b7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎supporting_scripts/create_mask_rcnn_tf_record.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,10 @@ def main(_):
232232
images_dir_path = os.path.join(data_dir_path, FLAGS.images_dir)
233233
annotations_dir_path = os.path.join(data_dir_path, FLAGS.annotations_dir)
234234
tfrecord_dir_path = FLAGS.data_dir_path
235-
label_map_dict = label_map_util.get_label_map_dict(FLAGS.label_map_path)
236-
for key in label_map_dict.keys():
237-
label_map_dict[key] = [label_map_dict[key], key[-3:]]
235+
label_map_dict_temp = label_map_util.get_label_map_dict(FLAGS.label_map_path)
236+
label_map_dict = label_map_dict_temp.copy()
237+
for key in label_map_dict_temp.keys():
238+
label_map_dict[key] = [label_map_dict_temp[key], key[-3:]]
238239
label_map_dict[key[:-3]] = label_map_dict.pop(key)
239240

240241
logging.info('Reading from dataset.')
@@ -245,11 +246,11 @@ def main(_):
245246
for filename in images_filename:
246247
images_filename[images_filename.index(filename)] = filename[0:-4]
247248

248-
create_tf_record(images_dir_path,
249+
'''create_tf_record(images_dir_path,
249250
annotations_dir_path,
250251
tfrecord_dir_path,
251252
label_map_dict,
252-
images_filename)
253+
images_filename)'''
253254

254255
if __name__ == '__main__':
255256
tf.app.run()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /