sahi
sahi copied to clipboard
Evaluation with mask
Hi, if I run the evaluation script with masks, it returns the following error:
File "/usr/local/lib/python3.8/dist-packages/sahi/scripts/coco_evaluation.py", line 382, in evaluate
result = evaluate_core(
File "/usr/local/lib/python3.8/dist-packages/sahi/scripts/coco_evaluation.py", line 147, in evaluate_core
cocoDt = cocoGt.loadRes(results)
File "/usr/local/lib/python3.8/dist-packages/pycocotools/coco.py", line 347, in loadRes
ann['area'] = maskUtils.area(ann['segmentation'])
File "/usr/local/lib/python3.8/dist-packages/pycocotools/mask.py", line 95, in area
return _mask.area(rleObjs)
File "pycocotools/_mask.pyx", line 160, in pycocotools._mask.area
File "pycocotools/_mask.pyx", line 128, in pycocotools._mask._frString
TypeError: list indices must be integers or slices, not str
Also, I noticed that in the definition of eval function is an option:
type (bool): 'bbox' or 'mask'
while in the definition of evaluate_core function:
metric (str | list[str]): Metrics to be evaluated. Options are 'bbox', 'segm', 'proposal'.
I have the last version: 0.8.22. In some previous versions, the evaluation for segmentation masks certainly worked.
Thank you for your inspection.