diff --git a/voc_annotation.py b/voc_annotation.py index 3c80836c9409507edc5a32f27c0046ed8f92ae38..aad06573cb4ebb7df461256759d793fe2ad44827 100644 --- a/voc_annotation.py +++ b/voc_annotation.py @@ -6,7 +6,7 @@ sets=[('2007', 'train'), ('2007', 'val'), ('2007', 'test')] classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"] def convert_annotation(year, image_id, list_file): - in_file = open('VOCdevkit/VOC%s/Annotations/%s.xml'%(year, image_id)) + in_file = open('VOCdevkit/VOC%s/Annotations/%s.xml'%(year, image_id), encoding='utf-8') tree=ET.parse(in_file) root = tree.getroot()