|
@@ -239,7 +239,7 @@ def points2lines(pred, sourceP_LB=True, prob=0.2, line_width=7, padding=3, min_l
|
|
_last = False
|
|
_last = False
|
|
_current = False
|
|
_current = False
|
|
while 1:
|
|
while 1:
|
|
- h_index += 2
|
|
|
|
|
|
+ h_index += 5
|
|
if h_index>=height:
|
|
if h_index>=height:
|
|
break
|
|
break
|
|
w_index = -1
|
|
w_index = -1
|
|
@@ -248,7 +248,7 @@ def points2lines(pred, sourceP_LB=True, prob=0.2, line_width=7, padding=3, min_l
|
|
else:
|
|
else:
|
|
h_i = h_index
|
|
h_i = h_index
|
|
while 1:
|
|
while 1:
|
|
- w_index += 2
|
|
|
|
|
|
+ w_index += 5
|
|
if w_index>=width:
|
|
if w_index>=width:
|
|
break
|
|
break
|
|
if _sum[w_index]<min_len:
|
|
if _sum[w_index]<min_len:
|
|
@@ -274,12 +274,12 @@ def points2lines(pred, sourceP_LB=True, prob=0.2, line_width=7, padding=3, min_l
|
|
w_index = -1
|
|
w_index = -1
|
|
_sum = list(np.sum(np.array((pred[...,0]>prob)).astype(int),axis=1))
|
|
_sum = list(np.sum(np.array((pred[...,0]>prob)).astype(int),axis=1))
|
|
while 1:
|
|
while 1:
|
|
- w_index += 2
|
|
|
|
|
|
+ w_index += 5
|
|
if w_index>=width:
|
|
if w_index>=width:
|
|
break
|
|
break
|
|
h_index = -1
|
|
h_index = -1
|
|
while 1:
|
|
while 1:
|
|
- h_index += 2
|
|
|
|
|
|
+ h_index += 5
|
|
if h_index>=height:
|
|
if h_index>=height:
|
|
break
|
|
break
|
|
if _sum[h_index]<min_len:
|
|
if _sum[h_index]<min_len:
|