提交 a795aa70 编写于 作者: M Megvii Engine Team 提交者: Xinran Xu

fix(mge/data): fix wrong class name in voc

GitOrigin-RevId: 229038bcfa84d109f299cba42bdfe7c51e37b4a0
上级 ae506ecf
......@@ -93,9 +93,7 @@ class PascalVOC(VisionDataset):
elif k == "boxes_category":
anno = self.parse_voc_xml(ET.parse(self.annotations[index]).getroot())
boxes_category = [obj["name"] for obj in anno["annotation"]["object"]]
boxes_category = [
self.class_names.index(bc) - 1 for bc in boxes_category
]
boxes_category = [self.class_names.index(bc) for bc in boxes_category]
boxes_category = np.array(boxes_category, dtype=np.int32)
target.append(boxes_category)
elif k == "mask":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册