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

fix(mge/data): fix typos in voc and objects365

GitOrigin-RevId: 491e607b7e67d54259b010f150cfe556959783f6
上级 3966bb08
......@@ -129,7 +129,7 @@ class Objects365(VisionDataset):
img_info = self.imgs[img_id]
return img_info
class_name = (
class_names = (
"person",
"sneakers",
"chair",
......
......@@ -93,7 +93,9 @@ 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) for bc in boxes_category]
boxes_category = [
self.class_names.index(bc) + 1 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.
先完成此消息的编辑!
想要评论请 注册