mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-11-13 16:43:30 +00:00
add db++
This commit is contained in:
parent
0ae4f66461
commit
a63f4414e2
@ -273,7 +273,7 @@ class DetResizeForTest(object):
|
|||||||
def resize_image_type1(self, img):
|
def resize_image_type1(self, img):
|
||||||
resize_h, resize_w = self.image_shape
|
resize_h, resize_w = self.image_shape
|
||||||
ori_h, ori_w = img.shape[:2] # (h, w, c)
|
ori_h, ori_w = img.shape[:2] # (h, w, c)
|
||||||
if self.keep_ratio:
|
if self.keep_ratio is True:
|
||||||
resize_w = ori_w * resize_h / ori_h
|
resize_w = ori_w * resize_h / ori_h
|
||||||
N = math.ceil(resize_w / 32)
|
N = math.ceil(resize_w / 32)
|
||||||
resize_w = N * 32
|
resize_w = N * 32
|
||||||
|
|||||||
@ -323,7 +323,6 @@ class ResNet_vd(nn.Layer):
|
|||||||
for block in range(len(depth)):
|
for block in range(len(depth)):
|
||||||
block_list = []
|
block_list = []
|
||||||
shortcut = False
|
shortcut = False
|
||||||
# is_dcn = self.dcn_stage[block]
|
|
||||||
for i in range(depth[block]):
|
for i in range(depth[block]):
|
||||||
basic_block = self.add_sublayer(
|
basic_block = self.add_sublayer(
|
||||||
'bb_%d_%d' % (block, i),
|
'bb_%d_%d' % (block, i),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user