Преглед изворни кода

update cityMangement3 weights

master
wangjin0928 пре 8 месеци
родитељ
комит
efcf713dcc
2 измењених фајлова са 2 додато и 2 уклоњено
  1. BIN
      __pycache__/ocr.cpython-38.pyc
  2. +2
    -2
      ocr.py

BIN
__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…
Откажи
Сачувај