首页 PaddleCV 帖子详情
PaddleDetection进行验证时的问题
收藏
快速回复
PaddleCV 问答目标检测 803 3
PaddleDetection进行验证时的问题
收藏
快速回复
PaddleCV 问答目标检测 803 3

python tools/eval.py -c configs/yolov3/yolov3_mobilenet_v1_270e_coco.yml -o weights=output\yolov3_mobilenet_v1_270e_coco\model_final.pdparams
W0925 18:49:32.654112 2912 device_context.cc:404] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.2, Runtime API Version: 11.2
W0925 18:49:32.659113 2912 device_context.cc:422] device: 0, cuDNN Version: 8.2.
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
[09/25 18:49:34] ppdet.utils.checkpoint INFO: Finish loading model weights: output\yolov3_mobilenet_v1_270e_coco\model_final.pdparams
[09/25 18:49:35] ppdet.engine INFO: Eval iter: 0
[09/25 18:49:35] ppdet.metrics.metrics INFO: The bbox result is saved to bbox.json.
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
[09/25 18:49:35] ppdet.metrics.coco_utils INFO: Start evaluate...
Loading and preparing results...
DONE (t=0.01s)
creating index...
index created!
Traceback (most recent call last):
File "tools/eval.py", line 135, in
main()
File "tools/eval.py", line 131, in main
run(FLAGS, cfg)
File "tools/eval.py", line 106, in run
trainer.evaluate()
File "D:\Program Files (x86)\paddle\PaddleDetection\ppdet\engine\trainer.py", line 447, in evaluate
self._eval_with_loader(self.loader)
File "D:\Program Files (x86)\paddle\PaddleDetection\ppdet\engine\trainer.py", line 439, in _eval_with_loader
metric.accumulate()
File "D:\Program Files (x86)\paddle\PaddleDetection\ppdet\metrics\metrics.py", line 132, in accumulate
classwise=self.classwise)
File "D:\Program Files (x86)\paddle\PaddleDetection\ppdet\metrics\coco_utils.py", line 111, in cocoapi_eval
coco_eval = COCOeval(coco_gt, coco_dt, style)
File "C:\Users\psc\AppData\Roaming\Python\Python37\site-packages\pycocotools\cocoeval.py", line 76, in __init__
self.params = Params(iouType=iouType) # parameters
File "C:\Users\psc\AppData\Roaming\Python\Python37\site-packages\pycocotools\cocoeval.py", line 527, in __init__
self.setDetParams()
File "C:\Users\psc\AppData\Roaming\Python\Python37\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 "C:\Users\psc\AppData\Roaming\Python\Python37\site-packages\numpy\core\function_base.py", line 113, in linspace
num = operator.index(num)
TypeError: 'numpy.float64' object cannot be interpreted as an integer

 

是Numpy版本的问题,还是paddleDetection本身自带的问题啊

0
收藏
回复
全部评论(3)
时间顺序
v
v_wenylv
#2 回复于2021-09

这个是numpy版本问题  可以强制转换成 int(np.round((0.95 - .5) / .05) + 1)

 

0
回复
半树海棠0
#3 回复于2021-09
这个是numpy版本问题  可以强制转换成 int(np.round((0.95 - .5) / .05) + 1)  

直接去修改文件吗

0
回复
李长安
#4 回复于2021-12

可以更新一下numpy

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户