Skip to content

Commit

Permalink
Merge pull request #1 from yichenj/voc2012_patch
Browse files Browse the repository at this point in the history
Revise voc2012 dataset preparing script
  • Loading branch information
yichenj committed Aug 20, 2020
2 parents 34fd1c9 + 313df71 commit 17bcb67
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 17bcb67

Please sign in to comment.