keypoint_rcnn_training_pytorch
keypoint_rcnn_training_pytorch copied to clipboard
Results do not correspond to current coco set
Hi, First, thanks for your really nice tutorial! I tried to reproduce it and raised an error at the call to the function evaluate, at the end of the training loop:
assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds()))
'Results do not correspond to current coco set'
After exploring, I managed to fix it by replacing the line 100 in the engine.py script.
I replaced
res = {target["image_id"]: output for target, output in zip(targets, outputs)}
by the line
res = {(target["image_id"]).tolist()[0]: output for target, output in zip(targets, outputs)}
The newline cast the image_id (formerly a tensor du to the ClassDataset definition) into an int, to match the id of the coco_evaluator. Not sure if it was the best way to fix this issue but it might be enough, and it could help another one facing this issue !
I had the same issue and the solution here solved it for me https://github.com/alexppppp/keypoint_rcnn_training_pytorch/issues/12