瀏覽代碼

update cityMangement3 weights

master
wangjin0928 8 月之前
父節點
當前提交
efcf713dcc
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. 二進制
      __pycache__/ocr.cpython-38.pyc
  2. +2
    -2
      ocr.py

二進制
__pycache__/ocr.cpython-38.pyc 查看文件


+ 2
- 2
ocr.py 查看文件

@@ -46,7 +46,7 @@ class ocrModel(object):
logger = trt.Logger(trt.Logger.ERROR)
with open(weights, "rb") as f, trt.Runtime(logger) as runtime:
self.model=runtime.deserialize_cuda_engine(f.read())# 输入trt本地文件,返回ICudaEngine对象
self.context = self.model.create_execution_context()
#self.context = self.model.create_execution_context()
elif self.infer_type=='pth':
if par['mode']=='ch':
@@ -70,7 +70,7 @@ class ocrModel(object):
self.model.eval()
preds = self.model(image)
else:
preds,trtstr=OcrTrtForward(self.model,[image],self.context)
preds,trtstr=OcrTrtForward(self.model,[image],False)
t2 = time.time()
preds_size = torch.IntTensor([preds.size(0)]*1)

Loading…
取消
儲存