Spaces:
Build error
Build error
First model version
Browse files
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.
|
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)
|