HRNet/HigherHRNet-Human-Pose-Estimation

Requesting guidance for error during validation : KeyError: 'i'

Abhijeet241093 opened this issue · 0 comments

Commond :

python tools/valid.py --cfg experiments/coco/higher_hrnet/w32_512_adam_lr1e-3.yaml TEST.MODEL_FILE /home/tricubics/Desktop/HigherHRNet-Human-Pose-Estimation/output/coco_kpt/pose_higher_hrnet/w32_512_adam_lr1e-3/model_best.pth.tar

Error generated :
=> classes: ['background', 'holding', 'nonholding']
Traceback (most recent call last):
File "tools/valid.py", line 220, in
main()
File "tools/valid.py", line 153, in main
for i, (images, annos) in enumerate(data_loader):
File "/home/tricubics/anaconda3/envs/hrnet/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 631, in next
data = self._next_data()
File "/home/tricubics/anaconda3/envs/hrnet/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 675, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/tricubics/anaconda3/envs/hrnet/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/tricubics/anaconda3/envs/hrnet/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/tricubics/Desktop/HigherHRNet-Human-Pose-Estimation/tools/../lib/dataset/COCODataset.py", line 109, in getitem
file_name = coco.loadImgs(img_id)[0]['file_name']
File "/home/tricubics/.local/lib/python3.8/site-packages/pycocotools/coco.py", line 227, in loadImgs
return [self.imgs[id] for id in ids]
File "/home/tricubics/.local/lib/python3.8/site-packages/pycocotools/coco.py", line 227, in
return [self.imgs[id] for id in ids]
KeyError: 'i'