未验证 提交 2ce7fba7 编写于 作者: B Bubbliiiing 提交者: GitHub

Update get_gt_txt.py

上级 7cf04524
......@@ -7,6 +7,7 @@ import sys
import os
import glob
import xml.etree.ElementTree as ET
from tqdm import tqdm
image_ids = open('VOCdevkit/VOC2007/ImageSets/Main/test.txt').read().strip().split()
......@@ -15,7 +16,7 @@ if not os.path.exists("./input"):
if not os.path.exists("./input/ground-truth"):
os.makedirs("./input/ground-truth")
for image_id in image_ids:
for image_id in tqdm(image_ids):
with open("./input/ground-truth/"+image_id+".txt", "w") as new_f:
root = ET.parse("VOCdevkit/VOC2007/Annotations/"+image_id+".xml").getroot()
for obj in root.findall('object'):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册