Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对模型进行评估迭代完成后报错 #363

Closed
qq345481843 opened this issue Mar 20, 2020 · 1 comment
Closed

对模型进行评估迭代完成后报错 #363

qq345481843 opened this issue Mar 20, 2020 · 1 comment

Comments

@qq345481843
Copy link

......
2020-03-20 14:41:51,107-INFO: Test iter 9300
2020-03-20 14:42:10,149-INFO: Test iter 9400
2020-03-20 14:42:29,215-INFO: Test iter 9500
2020-03-20 14:42:48,115-INFO: Test iter 9600
2020-03-20 14:43:04,916-INFO: Test finish iter 9690
2020-03-20 14:43:04,916-INFO: Total number of images: 9690, inference time: 5.2448062193586455 fps.
loading annotations into memory...
Done (t=0.29s)
creating index...
index created!
2020-03-20 14:43:06,715-INFO: Start evaluate...
Loading and preparing results...
DONE (t=0.60s)
creating index...
index created!
Traceback (most recent call last):
File "/home/cyye/.local/lib/python3.6/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 "tools/eval.py", line 190, in
main()
File "tools/eval.py", line 173, in main
dataset=dataset)
File "/home/cyye/jhwang/PaddleDetection/ppdet/utils/eval_utils.py", line 205, in eval_results
is_bbox_normalized=is_bbox_normalized)
File "/home/cyye/jhwang/PaddleDetection/ppdet/utils/coco_eval.py", line 94, in bbox_eval
map_stats = cocoapi_eval(outfile, 'bbox', coco_gt=coco_gt)
File "/home/cyye/jhwang/PaddleDetection/ppdet/utils/coco_eval.py", line 147, in cocoapi_eval
coco_eval = COCOeval(coco_gt, coco_dt, style)
File "/home/cyye/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 76, in init
self.params = Params(iouType=iouType) # parameters
File "/home/cyye/.local/lib/python3.6/site-packages/pycocotools/cocoeval.py", line 527, in init
self.setDetParams()
File "/home/cyye/.local/lib/python3.6/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/cyye/.local/lib/python3.6/site-packages/numpy/core/function_base.py", line 121, in linspace
.format(type(num)))
TypeError: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer.
出现这个报错可能的原因是什么?

希望能得到回复,谢谢。

@heavengate
Copy link
Collaborator

numpy最新版本修改了linspace用法,pyccocotools没有适配的报错,参考 #245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants