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本身自带的问题啊
这个是numpy版本问题 可以强制转换成 int(np.round((0.95 - .5) / .05) + 1)
直接去修改文件吗
可以更新一下numpy