-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
numpy版本为1.17.4 仍然报错 'numpy.float64' object cannot be interpreted as an integer #7448
Comments
numpy 1.21.5 测试过没有报错,你看下你eval完存下来的bbox.json里的数值有没有问题。 |
我当前是1.21.5,报错“TypeError: 'numpy.float64' object cannot be interpreted as an integer” 我的环境 |
问题确认 Search before asking
Bug组件 Bug Component
No response
Bug描述 Describe the Bug
问题一:训练一轮后报错“'numpy.float64' object cannot be interpreted as an integer”
最初我的numpy 版本是1.21.6,报错“'numpy.float64' object cannot be interpreted as an integer”,
我已参考"https://github.com/PaddlePaddle/PaddleDetection/issues/245",将numpy改成1.17.4,仍然报错
将numpy 改成1.21.5,仍然报错
python tools/train.py -c configs/faster_rcnn/faster_rcnn_r50_vd_fpn_ssld_1x_rice.yml -o LearningRate.base_lr=0.00125 worker_num=1 --eval
[12/03 14:49:32] ppdet.engine INFO: Epoch: [0] [240/260] learning_rate: 0.000395 loss_rpn_cls: 0.267394 loss_rpn_reg: 0.168532 loss_bbox_cls: 0.434746 loss_bbox_reg: 0.887510 loss: 1.783545 eta: 0:08:24 batch_cost: 0.1729 data_cost: 0.0002 ips: 5.7833 images/s
[12/03 14:49:36] ppdet.utils.checkpoint INFO: Save checkpoint: output\faster_rcnn_r50_vd_fpn_ssld_1x_rice
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
[12/03 14:49:36] ppdet.engine INFO: Eval iter: 0
[12/03 14:49:38] ppdet.metrics.metrics INFO: The bbox result is saved to bbox.json.
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
[12/03 14:49:38] ppdet.metrics.coco_utils INFO: Start evaluate...
Loading and preparing results...
DONE (t=0.02s)
creating index...
index created!
Traceback (most recent call last):
File "tools/train.py", line 172, in
main()
File "tools/train.py", line 168, in main
run(FLAGS, cfg)
File "tools/train.py", line 132, in run
trainer.train(FLAGS.eval)
File "D:\pkg\PaddleDetection\ppdet\engine\trainer.py", line 564, in train
self._eval_with_loader(self._eval_loader)
File "D:\pkg\PaddleDetection\ppdet\engine\trainer.py", line 613, in _eval_with_loader
metric.accumulate()
File "D:\pkg\PaddleDetection\ppdet\metrics\metrics.py", line 142, in accumulate
classwise=self.classwise)
File "D:\pkg\PaddleDetection\ppdet\metrics\coco_utils.py", line 111, in cocoapi_eval
coco_eval = COCOeval(coco_gt, coco_dt, style)
File "D:\soft\anaconda3\envs\paddle\lib\site-packages\pycocotools-2.0-py3.7-win-amd64.egg\pycocotools\cocoeval.py", line 76, in init
self.params = Params(iouType=iouType) # parameters
File "D:\soft\anaconda3\envs\paddle\lib\site-packages\pycocotools-2.0-py3.7-win-amd64.egg\pycocotools\cocoeval.py", line 527, in init
self.setDetParams()
File "D:\soft\anaconda3\envs\paddle\lib\site-packages\pycocotools-2.0-py3.7-win-amd64.egg\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 "D:\soft\anaconda3\envs\paddle\lib\site-packages\numpy\core\function_base.py", line 120, in linspace
num = operator.index(num)
TypeError: 'numpy.float64' object cannot be interpreted as an integer
我本来是2.4的paddle, 训练报错out of bound,参考“https://github.com/PaddlePaddle/PaddleDetection/issues/7371”升级了paddle0.0.0, 但是还是报错,现又改成2.2.2还是不成。到底咋整啊?
**问题二:infer中 save_results=True,没有.json输出,带slice_infer就没有输出,怎么才能输出?已经发布问题了,迟迟没有回复。。
CUDA_VISIBLE_DEVICES=0 python tools/infer.py -c configs/faster_rcnn/faster_rcnn_r50_vd_fpn_ssld_1x_rice.yml -o weights=/home/aistudio/work/PaddleDetection/output/faster_rcnn_r50_vd_fpn_ssld_1x_rice/best_model.pdparams --infer_dir=/home/aistudio/data/price --output_dir /home/aistudio/data/price/frcnn --draw_threshold=0.65 --save_results=True --slice_infer --slice_size 640 640 --overlap_ratio 0.25 0.25 --combine_method=nms --match_threshold=0.6 --match_metric=ios
复现环境 Environment
win
paddlegpu 2.2.2
paddledet 2.5.0
pycocotools 2.0
protobuf 4.21.1
cuda 11.2
numpy 1.17.6
Bug描述确认 Bug description confirmation
是否愿意提交PR? Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: