在我运行eval的时候载入bbx报了一个这个错:
大伙儿能帮我看看嘛#跪谢
running coco-style evaluation on project coco2017, weights /notebooks/storage/logs/coco2017/efficientdet-d2_15_912.pth...
loading annotations into memory...
Done (t=0.01s)
creating index...
index created!
Loading and preparing results...
DONE (t=0.88s)
creating index...
index created!
BBox
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-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 "/usr/local/lib/python3.6/dist-packages/pycocotools/cocoeval.py", line 76, in __init__
self.params = Params(iouType=iouType) # parameters
File "/usr/local/lib/python3.6/dist-packages/pycocotools/cocoeval.py", line 527, in __init__
self.setDetParams()
File "/usr/local/lib/python3.6/dist-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 "/usr/local/lib/python3.6/dist-packages/numpy/core/function_base.py", line 121, in linspace
.format(type(num)))
TypeError: object of type
我以为bbx值必须是整数 因为之前用VOC的时候也出现过这个问题,后来改成整数也会报同样的错误
哈哈哈哈哈哈got it 是我numpy版本太高了 需要降一下版本 pip install -U numpy==1.17.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 就完事了奥
i meet the same issue.
good job!
thanks
Most helpful comment
哈哈哈哈哈哈got it 是我numpy版本太高了 需要降一下版本 pip install -U numpy==1.17.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 就完事了奥