delete -1 in east and db process
This commit is contained in:
parent
e0b194da1c
commit
a565815044
|
@ -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
|
||||||
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):
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue