YOLOX
YOLOX copied to clipboard
Fix: Preserve 'info' field in COCO-style annotations for compatibility with pycocotools >= 2.0.9
Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'.
This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools
PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9
downgrade the pycocotools to 2.0.0
downgrade the pycocotools to 2.0.0
yes that works as a quick fix, I'm just suggesting a long-term fix to stay aligned with pycocotools
For me, version 2.0.8 worked
Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'.
This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools
PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9
Does this only happened in Evaluator? Using pop here could help users to save memory
Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'. This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9
Does this only happened in Evaluator? Using
pophere could help users to save memory
Yes, only in Evaluator !
if you think saving memory is crucial here maybe we can just update requirements.txt with version < 2.0.9
Since the release of pycocotools version 2.0.9, the loadRes function now requires the 'info' field to be present in the result file. If missing, using COCOEvaluator.evaluate_prediction raises a KeyError: 'info'. This PR updates the preprocessing step to preserve the 'info' field instead of discarding it, ensuring compatibility with recent versions of pycocotools PS: this fix is minimal and untested locally but aligns with upstream changes in pycocotools 2.0.9
Does this only happened in Evaluator? Using
pophere could help users to save memoryYes, only in Evaluator !
if you think saving memory is crucial here maybe we can just update requirements.txt with version < 2.0.9
Could you check if it's in eval mode, if so, don't pop, else pop?