Cyril666 commited on
Commit
526ba16
·
1 Parent(s): 2d88138

First model version

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ def infer(filepath):
41
 
42
  patchs = [image[box[1]:box[3], box[0]:box[2], :] for box in result_boxes]
43
  patchs = [preprocess(patch, config.dataset_image_width, config.dataset_image_height) for patch in patchs]
44
- patchs = torch.stack(patchs, dim=0)
45
  res = model(patchs)
46
  rec_result = postprocess(res, charset, 'alignment')[0]
47
  print(rec_result)
 
41
 
42
  patchs = [image[box[1]:box[3], box[0]:box[2], :] for box in result_boxes]
43
  patchs = [preprocess(patch, config.dataset_image_width, config.dataset_image_height) for patch in patchs]
44
+ patchs = torch.cat(patchs, dim=0)
45
  res = model(patchs)
46
  rec_result = postprocess(res, charset, 'alignment')[0]
47
  print(rec_result)