Commit d0d387c6 authored by liuhy's avatar liuhy
Browse files

修改限制数据为连续数据

parent 331f6342
...@@ -24,7 +24,8 @@ def LPRNetPreprocess(image): ...@@ -24,7 +24,8 @@ def LPRNetPreprocess(image):
img = cv2.resize(img, (94, 24)).astype('float32') img = cv2.resize(img, (94, 24)).astype('float32')
img -= 127.5 img -= 127.5
img *= 0.0078125 img *= 0.0078125
img = np.expand_dims(img.transpose(2, 0, 1), 0) # img = np.expand_dims(img.transpose(2, 0, 1), 0)
img = np.ascontiguousarray(np.expand_dims(img.transpose(2, 0, 1), 0))
return img return img
def LPRNetPostprocess(infer_res): def LPRNetPostprocess(infer_res):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment