简体   繁体   中英

Android Studio: Could I load my Yolov5 model (.pt file) in my phone without converting to TFLite and torchscript?

I search on the Internet, most of people use TFLite and Torchscript for object detection. But, I think my phone has GPU, it is not necessarily to convert to other version for reducing the hardware pressure. So can we just load the.pt file directly? And how to do that? Seem that I cannot just change the code as below.

mModule = LiteModuleLoader.load(MainActivity.assetFilePath(getApplicationContext(), "best.pt"));   

Here is some detail about the PyTorch package for Android. Seem that it not yet support android to run the.pt file.

[1] https://pytorch.org/mobile/android/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM