PaddlePaddle / PaddleYOLO

🚀🚀🚀 YOLO series of PaddlePaddle implementation, PP-YOLOE+, RT-DETR, YOLOv5, YOLOv6, YOLOv7, YOLOv8, YOLOv10, YOLOX, YOLOv5u, YOLOv7u, YOLOv6Lite, RTMDet and so on. 🚀🚀🚀
https://github.com/PaddlePaddle/PaddleYOLO
GNU General Public License v3.0
558 stars 134 forks source link

%run tools/infer.py 报错:TypeError: 'numpy.float32' object cannot be interpreted as an integer #129

Closed overman1 closed 1 year ago

overman1 commented 1 year ago

问题确认 Search before asking

Bug组件 Bug Component

Inference

Bug描述 Describe the Bug

model_name='yolov8' job_name='yolov8_x_500e_coco'

config=f'configs/{model_name}/{job_name}.yml' weights=f'../pretrain/{job_name}.pdparams'

%run tools/infer.py -c {config} -o weights={weights} use_gpu=false --infer_img=demo/000000014439_640x640.jpg --draw_threshold=0.5

1 2

复现环境 Environment

OS:macOS-13.1-x86_64-i386-64bit paddlepaddle:2.4.1 Paddleyolo :2.6 Python 3.10.9 NO GPU

Bug描述确认 Bug description confirmation

是否愿意提交PR? Are you willing to submit a PR?

nemonameless commented 1 year ago

自测没有问题。建议使用最新代码,且手打一行完整运行命令再试下: python tools/infer.py -c configs/yolov8/yolov8_x_500e_coco.yml -o use_gpu=false weights=yolov8_x_500e_coco.pdparams --infer_img=demo/000000329219.jpg