Skip to content

KeyError: "There is no item named 'val2017/000000397133.jpg' in the archive" #34

@longpeace

Description

@longpeace

I have prepared the coco2017 dataset as the format of .zip.
But when I run the test command
python tools/valid.py --cfg experiments/coco/w32/w32_4x_reg03_bs10_512_adam_lr1e-3_coco_x140.yaml TEST.MODEL_FILE model/pose_coco/pose_dekr_hrnetw32_coco.pth ,
I faced with the error:
Traceback (most recent call last):
File "tools/valid.py", line 212, in
main()
File "tools/valid.py", line 134, in main
for i, images in enumerate(data_loader):
File "/root/anaconda3/envs/dekr/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 517, in next
data = self._next_data()
File "/root/anaconda3/envs/dekr/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 557, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/root/anaconda3/envs/dekr/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/anaconda3/envs/dekr/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/lzj/DEKR/tools/../lib/dataset/COCODataset.py", line 104, in getitem
cv2.IMREAD_COLOR | cv2.IMREAD_IGNORE_ORIENTATION
File "/root/lzj/DEKR/tools/../lib/utils/zipreader.py", line 53, in imread
data = _im_zfile[-1]['zipfile'].read(path_img)
File "/root/anaconda3/envs/dekr/lib/python3.7/zipfile.py", line 1465, in read
with self.open(name, "r", pwd) as fp:
File "/root/anaconda3/envs/dekr/lib/python3.7/zipfile.py", line 1504, in open
zinfo = self.getinfo(name)
File "/root/anaconda3/envs/dekr/lib/python3.7/zipfile.py", line 1431, in getinfo
'There is no item named %r in the archive' % name)
KeyError: "There is no item named 'val2017/000000397133.jpg' in the archive"

Do you have any idea to solve it?
Thanks a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions