v0.8.4
- handle predictions with negative bbox values (#225)
- fix remove_invalid_coco_results (#227)
- fix coco evaluation (#228)
Remove invalid coco results:
from sahi.utils.file import save_json
from sahi.utils.coco import remove_invalid_coco_results
# remove invalid predictions from COCO results JSON
coco_results = remove_invalid_coco_results("coco_result.json")
# export processed COCO results
save_json(coco_results, "fixed_coco_result.json")
# bonus: remove invalid predictions from COCO results JSON by giving COCO
# dataset path to also filter out bbox results exceeding image height&width
coco_results = remove_invalid_coco_results("coco_result.json", "coco_dataset.json")