未验证 提交 456c4d13 编写于 作者: Y Yang Wei 提交者: GitHub

Update mpii_reader.py

判断文件是不是图片,如果不是图片的话,后面会导致异常退出。
上级 b87761f8
......@@ -185,8 +185,9 @@ def _reader_creator(root, image_set, shuffle=False, is_train=False):
else:
fold = 'test'
for img_name in os.listdir(fold):
yield dict(image=os.path.join(fold, img_name),
filename=img_name)
if(img_name.endswith(".jpg") or img_name.endswith(".png")):
yield dict(image=os.path.join(fold, img_name),
filename=img_name)
if not image_set == 'test':
mapper = functools.partial(data_augmentation, is_train=is_train)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册