mirror of
https://github.com/we0091234/crnn_plate_recognition.git
synced 2024-05-03 09:25:17 +08:00
onnx_modify
This commit is contained in:
parent
fd8a295488
commit
83e74b50c7
@ -35,7 +35,7 @@ if __name__=="__main__":
|
||||
dynamic_axes={'images': {0: 'batch'},
|
||||
'output': {0: 'batch'}
|
||||
} if opt.dynamic else None)
|
||||
|
||||
print(f"simplify completed,save to {opt.save_path}")
|
||||
if opt.simplify:
|
||||
from onnxsim import simplify
|
||||
print(f"begin simplify ....")
|
||||
|
@ -38,8 +38,9 @@ def rec_pre_precessing(img,size=(48,168)): #识别前处理
|
||||
def get_plate_result(img,session_rec): #识别后处理
|
||||
img =rec_pre_precessing(img)
|
||||
y_onnx = session_rec.run([session_rec.get_outputs()[0].name], {session_rec.get_inputs()[0].name: img})[0]
|
||||
index =np.argmax(y_onnx[0],axis=1)
|
||||
# print(y_onnx[0])
|
||||
plate_no = decodePlate(y_onnx[0])
|
||||
plate_no = decodePlate(index)
|
||||
return plate_no
|
||||
|
||||
def allFilePath(rootPath,allFIleList): #遍历文件
|
||||
|
Loading…
Reference in New Issue
Block a user