提交 a5658150 编写于 作者: W WenmuZhou

delete -1 in east and db process

上级 e0b194da
...@@ -165,13 +165,13 @@ class DBProcessTest(object): ...@@ -165,13 +165,13 @@ class DBProcessTest(object):
elif resize_h // 32 <= 1: elif resize_h // 32 <= 1:
resize_h = 32 resize_h = 32
else: else:
resize_h = (resize_h // 32 - 1) * 32 resize_h = (resize_h // 32) * 32
if resize_w % 32 == 0: if resize_w % 32 == 0:
resize_w = resize_w resize_w = resize_w
elif resize_w // 32 <= 1: elif resize_w // 32 <= 1:
resize_w = 32 resize_w = 32
else: else:
resize_w = (resize_w // 32 - 1) * 32 resize_w = (resize_w // 32) * 32
try: try:
if int(resize_w) <= 0 or int(resize_h) <= 0: if int(resize_w) <= 0 or int(resize_h) <= 0:
return None, (None, None) return None, (None, None)
......
...@@ -19,6 +19,7 @@ import json ...@@ -19,6 +19,7 @@ import json
import sys import sys
import os import os
class EASTProcessTrain(object): class EASTProcessTrain(object):
def __init__(self, params): def __init__(self, params):
self.img_set_dir = params['img_set_dir'] self.img_set_dir = params['img_set_dir']
...@@ -495,13 +496,13 @@ class EASTProcessTest(object): ...@@ -495,13 +496,13 @@ class EASTProcessTest(object):
elif resize_h // 32 <= 1: elif resize_h // 32 <= 1:
resize_h = 32 resize_h = 32
else: else:
resize_h = (resize_h // 32 - 1) * 32 resize_h = (resize_h // 32) * 32
if resize_w % 32 == 0: if resize_w % 32 == 0:
resize_w = resize_w resize_w = resize_w
elif resize_w // 32 <= 1: elif resize_w // 32 <= 1:
resize_w = 32 resize_w = 32
else: else:
resize_w = (resize_w // 32 - 1) * 32 resize_w = (resize_w // 32) * 32
try: try:
if int(resize_w) <= 0 or int(resize_h) <= 0: if int(resize_w) <= 0 or int(resize_h) <= 0:
return None, (None, None) return None, (None, None)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册