Skip to content
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

paddleclas.PaddleClas使用inference_model_dir指定模型PULC模型识别有误 #3130

Open
jianxianglisir opened this issue Apr 25, 2024 · 1 comment
Assignees

Comments

@jianxianglisir
Copy link

  1. PaddleClas版本:PaddleClas release/2.5 和 PaddlePaddle 2.6.1

  2. 训练环境信息:
    a. 具体操作系统, Windows
    b. Python版本号,Python3.9
    c. CUDA/cuDNN版本, 如CUDA11.2/cuDNN 8

  3. 错误信息及相关log

model = paddleclas.PaddleClas(model_name="person_exists")
model = paddleclas.PaddleClas(inference_model_dir="inference_model/PULC/person_exists")

inference_model_dir 指定的模型识别结果个模型无关,使用 model.get_config() 发现配置参数与 model_name方式 不一致。

排查问题发现在paddleclas.BASE_DIR 指定了 ~/.paddleclas/ 文件路径且无法动态修改,在 PaddleClas init() 方法修改变量可实现

global BASE_DIR, BASE_INFERENCE_MODEL_DIR
if base_dir:
BASE_DIR = base_dir
BASE_INFERENCE_MODEL_DIR = os.path.join(BASE_DIR, "inference_model")

是否还有其他方法可以指定PaddleClas model_name路径?

@changdazhou
Copy link
Contributor

感谢您的反馈,我们已经记录下问题,后续会排查修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants