未验证 提交 17e05cd1 编写于 作者: X xiaoting 提交者: GitHub

Merge pull request #985 from WenmuZhou/fix_cls_doc

delete -1 in east and db process
...@@ -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.
先完成此消息的编辑!
想要评论请 注册