zeusees / License-Plate-Detector

基于Yolov5车牌检测,更快更准.
http://www.zeusee.com
1.2k stars 400 forks source link

咨询一下:libtorch c++使用torch::jit::load(“best.pt”, device)异常 #47

Closed zhigaowu closed 2 years ago

zhigaowu commented 2 years ago

异常信息是:PytorchStreamReader failed locating file constants.pkl: file not found 请问一下:这个模型文件是要做什么处理吗?

panda-lab commented 2 years ago

是不是路径不对?你把模型的路径写成绝对路径试试?

zhigaowu commented 2 years ago

应该不是,我是用的是pt文件,这个pkl文件如果需要的话,也应该是pt内部的; 所以,我猜测这个pt的格式可能有点问题。 我使用onnx转换后的格式,使用tensorrt就没问题,可以正常使用