[cherry-pick] Update mpii_reader.py #4860
Conversation
问题描述: human_pose_estimation使用mpii数据集test的时候一直没有运行结果。在问题文件186行 fold = ‘test’ 修改为 fold = cfg.DATAROOT + '/' + cfg.IMAGEDIR + '/test' 之后可以运行,因为下一行os.listdir(fold)读取的路径不对,一直没读取到文件。
| @@ -183,7 +183,7 @@ def reader(): | |||
| test_mode=False, | |||
| imagenum=0) | |||
| else: | |||
| fold = 'test' | |||
| fold = cfg.DATAROOT + os.sep + cfg.IMAGEDIR + os.sep + 'test' | |||
littletomatodonkey
Sep 18, 2020
Contributor
使用os.path.join连接路径吧
使用os.path.join连接路径吧
a2824256
Sep 18, 2020
Author
Contributor
好的
好的
|
已使用os.path.join拼接路径 |
|
@a2824256 另外这个是1.8的分支,麻烦在develop分支上再提个PR |
|
已提交 |
|
LGTM |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

cherry-pick from #4862
操作系统: win10
python版本: 3.6.10
问题描述:
human_pose_estimation使用mpii数据集test的时候一直没有运行结果。在问题文件186行
fold = ‘test’
修改为
fold = cfg.DATAROOT + os.sep + cfg.IMAGEDIR + os.sep +'test'
之后可以运行,因为下一行os.listdir(fold)读取的路径不对,根目录下没有叫test的文件夹,所以一直读取0张图片,正确路径是data/mpii/images下的test文件夹。
对应issue链接:
#4859 (comment)