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.68k stars 2.87k forks source link

ModuleNotFoundError: No module named 'ppdet.utils.export_utils' #5111

Open Alex28132 opened 2 years ago

Alex28132 commented 2 years ago

PaddleDetection team appreciate any suggestion or problem you delivered~

Checklist:

  1. 查找历史相关issue寻求解答/I have searched related issues but cannot get the expected help.
  2. 翻阅FAQ /I have read the FAQ documentation but cannot get the expected help.

描述问题/Describe the bug

A clear and concise description of what the bug is.

在static文件夹下想export模型,报错:Traceback (most recent call last): File "tools/export_model.py", line 53, in raise e File "tools/export_model.py", line 40, in from ppdet.utils.export_utils import save_infer_model, dump_infer_config ModuleNotFoundError: No module named 'ppdet.utils.export_utils' 不知道咋解决,请求大家的帮助 python tools/export_model.py -c ./configs/rcnn_enhance/generic/cascade_rcnn_dcn_r101_vd_fpn_gen_server_side.yml --output_dir=./inference_model -o weights=./weights/cascade_rcnn_dcn_r101_vd_fpn_gen_server_side.pdparams

复现/Reproduction

  1. 您使用的命令是?/What command or script did you run?
python tools/export_model.py -c ./configs/rcnn_enhance/generic/cascade_rcnn_dcn_r101_vd_fpn_gen_server_side.yml --output_dir=./inference_model -o weights=./weights/cascade_rcnn_dcn_r101_vd_fpn_gen_server_side.pdparams
  1. 您是否更改过代码或配置文件?您是否理解您所更改的内容?还请您提供所更改的部分代码。/Did you make any modifications on the code or config? Did you understand what you have modified? Please provide the codes that you modified.

  2. 您使用的数据集是?/What dataset did you use?

  3. 请提供您出现的报错信息及相关log。/Please provide the error messages or relevant log information.

环境/Environment

  1. 请提供您使用的Paddle和PaddleDetection的版本号/Please provide the version of Paddle and PaddleDetection you use: Paddle2.2.1 PaddleDetection**

  2. 如您在使用PaddleDetection的同时还在使用其他产品,如PaddleServing、PaddleInference等,请您提供其版本号/ Please provide the version of any other related tools/products used, such as the version of PaddleServing and etc:

  3. 请提供您使用的操作系统信息,如Linux/Windows/MacOS /Please provide the OS information, e.g., Linux: win10

  4. 请问您使用的Python版本是?/ Please provide the version of Python you used. Python3.7

  5. 请问您使用的CUDA/cuDNN的版本号是?/ Please provide the version of CUDA/cuDNN you used. CUDA11.2 cuDNN8.1

如果您的issue是关于安装或环境,您可以先查询安装文档尝试解决~

If your issue looks like an installation issue / environment issue, please first try to solve it yourself with the instructions in https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.1/docs/tutorials/INSTALL.md

yghstill commented 2 years ago

@Alex28132 请问PaddleDetectiion版本是多少?指定python路径为当前路径再试下呢?

Alex28132 commented 2 years ago

@Alex28132 请问PaddleDetectiion版本是多少?指定python路径为当前路径再试下呢?

PaddleDetectiion2.3 指定路径为static路径,然后运行的代码

Alex28132 commented 2 years ago

各位大佬们有知道的吗。。。。。。

Alex28132 commented 2 years ago

解决了,删掉了虚拟环境,创建环境并重新配置环境就行