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 my trained pytorch model into android project? #9

Open
billhyde opened this issue Aug 19, 2019 · 6 comments
Open

how to use my trained pytorch model into android project? #9

billhyde opened this issue Aug 19, 2019 · 6 comments

Comments

@billhyde
Copy link

hi,thanks for sharing~ if I trained my own model ,how to convert it into android project and how to do inference in android? thanks~

@liurs1990
Copy link
Collaborator

you can save ONNX model and then transform to Caffe model.

@billhyde
Copy link
Author

Hi,thank you for reply. Is your Android example use caffe model? If you did not use the caffe framework, would you tell me what Deep learning framework you use?
I tested the android example ,it's pretty good, but i can not find the android infercence C++ source code. I want to use my own train pytorch model in android example like you,please help me,thanks .

@liurs1990
Copy link
Collaborator

No, I don't use Caffe on Android. NCNN is a good choice for Android.

@vwillagent
Copy link

we have trained a pytorch model and then convert to onnx model, the onnx model can be loaded and runned by python and get same predict score as pytorch model.
and then we convert onnx to ncnn using ncnn tool 'onnx2ncnn', we can load and run the ncnn model but predict is error, can you share you method, thanks

@PhenomenalOnee
Copy link

Can someone please provide your pretrained model with inference code in python

@luan1412167
Copy link

we have trained a pytorch model and then convert to onnx model, the onnx model can be loaded and runned by python and get same predict score as pytorch model.
and then we convert onnx to ncnn using ncnn tool 'onnx2ncnn', we can load and run the ncnn model but predict is error, can you share you method, thanks

Can you share how accurate you get with the model?

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

5 participants