diff --git a/ppocr/data/det/db_process.py b/ppocr/data/det/db_process.py index 9534c59ef69d830a8d991f421539c5e4e5bb3d39..7175651639bbf0a6e4b1416b10baebee3c2151b4 100644 --- a/ppocr/data/det/db_process.py +++ b/ppocr/data/det/db_process.py @@ -165,13 +165,13 @@ class DBProcessTest(object): elif resize_h // 32 <= 1: resize_h = 32 else: - resize_h = (resize_h // 32 - 1) * 32 + resize_h = (resize_h // 32) * 32 if resize_w % 32 == 0: resize_w = resize_w elif resize_w // 32 <= 1: resize_w = 32 else: - resize_w = (resize_w // 32 - 1) * 32 + resize_w = (resize_w // 32) * 32 try: if int(resize_w) <= 0 or int(resize_h) <= 0: return None, (None, None) diff --git a/ppocr/data/det/east_process.py b/ppocr/data/det/east_process.py index e2581caa20bb0e63f67e110d483d3335f51d56b7..71ba4786e2ab510250c1dbac0df36aad53a56eac 100755 --- a/ppocr/data/det/east_process.py +++ b/ppocr/data/det/east_process.py @@ -19,6 +19,7 @@ import json import sys import os + class EASTProcessTrain(object): def __init__(self, params): self.img_set_dir = params['img_set_dir'] @@ -495,13 +496,13 @@ class EASTProcessTest(object): elif resize_h // 32 <= 1: resize_h = 32 else: - resize_h = (resize_h // 32 - 1) * 32 + resize_h = (resize_h // 32) * 32 if resize_w % 32 == 0: resize_w = resize_w elif resize_w // 32 <= 1: resize_w = 32 else: - resize_w = (resize_w // 32 - 1) * 32 + resize_w = (resize_w // 32) * 32 try: if int(resize_w) <= 0 or int(resize_h) <= 0: return None, (None, None)