You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 !
The text was updated successfully, but these errors were encountered:
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 !
The text was updated successfully, but these errors were encountered: