Yet-another-efficientdet-pytorch: python coco_eval.py

Created on 13 Apr 2020  ·  1Comment  ·  Source: zylo117/Yet-Another-EfficientDet-Pytorch

python coco_eval.py
running coco-style evaluation on project coco, weights weights/efficientdet-d1.pth...
loading annotations into memory...
Done (t=0.31s)
creating index...
index created!
Loading and preparing results...
DONE (t=2.23s)
creating index...
index created!
BBox
Traceback (most recent call last):
File "/home/rencong/anaconda3/lib/python3.7/site-packages/numpy/core/function_base.py", line 117, in linspace
num = operator.index(num)
TypeError: 'numpy.float64' object cannot be interpreted as an integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "coco_eval.py", line 164, in
eval(coco_gt, image_ids, f'{SET_NAME}_bbox_results.json')
File "coco_eval.py", line 133, in eval
coco_eval = COCOeval(coco_gt, coco_pred, 'bbox')
File "/home/rencong/anaconda3/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 76, in __init__
self.params = Params(iouType=iouType) # parameters
File "/home/rencong/anaconda3/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 527, in __init__
self.setDetParams()
File "/home/rencong/anaconda3/lib/python3.7/site-packages/pycocotools/cocoeval.py", line 507, in setDetParams
self.iouThrs = np.linspace(.5, 0.95, np.round((0.95 - .5) / .05) + 1, endpoint=True)
File "<__array_function__ internals>", line 6, in linspace
File "/home/rencong/anaconda3/lib/python3.7/site-packages/numpy/core/function_base.py", line 121, in linspace
.format(type(num)))
TypeError: object of type cannot be safely interpreted as an integer.

Most helpful comment

pip install -U numpy==1.17.0

>All comments

pip install -U numpy==1.17.0

Was this page helpful?
0 / 5 - 0 ratings