PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.83k stars 2.89k forks source link

运行示例代码失败python tools/infer.py -c configs/ppyolo/ppyolo_r50vd_dcn_1x_coco.yml -o use_gpu=true weights=https://paddledet.bj.bcebos.com/models/ppyolo_r50vd_dcn_1x_coco.pdparams --infer_img=demo/000000014439.jpg #9205

Open ykinger1 opened 2 weeks ago

ykinger1 commented 2 weeks ago

问题确认 Search before asking

请提出你的问题 Please ask your question

(venv1) PS D:\kunsrc\Python\Dive_Into_PaddlePaddle\1_PaddleDetection\PaddleDetection> python tools/infer.py -c configs/ppyolo/ppyolo_r50vd_dcn_1x_coco.yml -o use_gpu=true weights=https://paddledet.bj.bcebos.com/models/ppyolo_r50vd_dcn_1x_coco.pdparams --infer_img=demo/000000014439.jpg D:\kunsrc\Python\Dive_Into_PaddlePaddle\venv1\lib\site-packages\pkg_resources__init__.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) D:\kunsrc\Python\Dive_Into_PaddlePaddle\venv1\lib\site-packages\pkg_resources__init__.py:2871: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) D:\kunsrc\Python\Dive_Into_PaddlePaddle\venv1\lib\site-packages\paddle\tensor\creation.py:130: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations if data.dtype == np.object: W1105 20:50:43.014034 25424 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.7, Runtime API Version: 11.2 W1105 20:50:43.018023 25424 device_context.cc:465] device: 0, cuDNN Version: 8.8. [11/05 20:50:46] ppdet.utils.checkpoint INFO: Finish loading model weights: C:\Users\kkk/.cache/paddle/weights\ppyolo_r50vd_dcn_1x_coco.pdparams [11/05 20:50:46] ppdet.utils.download WARNING: Config annotation dataset/coco\annotations/instances_val2017.json is not a file, dataset config is not valid [11/05 20:50:46] ppdet.utils.download INFO: Dataset D:\kunsrc\Python\Dive_Into_PaddlePaddle\1_PaddleDetection\PaddleDetection\dataset\coco is not valid for reason above, try searching C:\Users\kkk/.cache/paddle/dataset or downloading dataset... loading annotations into memory... Done (t=0.74s) creating index... index created! 0%| | 0/1 [00:00<?, ?it/s]Could not locate zlibwapi.dll. Please make sure it is in your library path!

zhangyubo0722 commented 2 weeks ago

使用默认配置的动态图推理的话套件会自动下载coco数据集,建议使用静态图推理,参考这个文档的静态图导出和推理部分 https://github.com/PaddlePaddle/PaddleDetection?tab=readme-ov-file#%E6%95%99%E7%A8%8B