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

How to use trained Resnet classification model in python code #3086

Closed
lokeycookie opened this issue Feb 1, 2024 · 5 comments
Closed

How to use trained Resnet classification model in python code #3086

lokeycookie opened this issue Feb 1, 2024 · 5 comments

Comments

@lokeycookie
Copy link

Hi there,

I have trained a classification model using this: https://github.com/PaddlePaddle/PaddleClas/blob/release/2.3/docs/zh_CN/quick_start/quick_start_classification_new_user.md

However, I do not know how to call the trained model in python code as I wanted to use this model in my existing code.
I do not want to run inference on an image using terminal.

Does anyone know how to do this?

@lokeycookie
Copy link
Author

lokeycookie commented Feb 2, 2024

I have trained finished the model. However, how do I use this trained model for inference and how do I integrate this model into my existing codebase?
Is there a function (for example, model.predict(img_array)) in paddleclas that I can call my trained model using python code?

@a31413510
Copy link

you can refer to "4.3 使用本地模型文件预测" in https://github.com/PaddlePaddle/PaddleClas/blob/release/2.5/docs/zh_CN/deployment/image_classification/whl.md

@TingquanGao
Copy link
Collaborator

@lokeycookie
Copy link
Author

thank you! the code works

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

No branches or pull requests

4 participants