Skip to content

Commit

Permalink
Revise voc2012 dataset preparing script
Browse files Browse the repository at this point in the history
the file name of 'aeroplane_xxx.txt' is easily to be misunderstood.
Use train.txt/eval.txt instead of the class-specific list file.
  • Loading branch information
yichenj committed Aug 7, 2020
1 parent 0d70db3 commit 313df71
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/voc2012.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ def main(_argv):

writer = tf.io.TFRecordWriter(FLAGS.output_file)
image_list = open(os.path.join(
FLAGS.data_dir, 'ImageSets', 'Main', 'aeroplane_%s.txt' % FLAGS.split)).read().splitlines()
FLAGS.data_dir, 'ImageSets', 'Main', '%s.txt' % FLAGS.split)).read().splitlines()
logging.info("Image list loaded: %d", len(image_list))
for image in tqdm.tqdm(image_list):
name, _ = image.split()
for name in tqdm.tqdm(image_list):
annotation_xml = os.path.join(
FLAGS.data_dir, 'Annotations', name + '.xml')
annotation_xml = lxml.etree.fromstring(open(annotation_xml).read())
Expand Down

0 comments on commit 313df71

Please sign in to comment.