@@ -232,9 +232,10 @@ def main(_):
232
232
images_dir_path = os .path .join (data_dir_path , FLAGS .images_dir )
233
233
annotations_dir_path = os .path .join (data_dir_path , FLAGS .annotations_dir )
234
234
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 :]]
238
239
label_map_dict [key [:- 3 ]] = label_map_dict .pop (key )
239
240
240
241
logging .info ('Reading from dataset.' )
@@ -245,11 +246,11 @@ def main(_):
245
246
for filename in images_filename :
246
247
images_filename [images_filename .index (filename )] = filename [0 :- 4 ]
247
248
248
- create_tf_record (images_dir_path ,
249
+ ''' create_tf_record(images_dir_path,
249
250
annotations_dir_path,
250
251
tfrecord_dir_path,
251
252
label_map_dict,
252
- images_filename )
253
+ images_filename)'''
253
254
254
255
if __name__ == '__main__' :
255
256
tf .app .run ()
0 commit comments