|
|
@ -846,9 +846,8 @@ class Eynollah:
|
|
|
|
seg_color = np.repeat(seg[:, :, np.newaxis], 3, axis=2)
|
|
|
|
seg_color = np.repeat(seg[:, :, np.newaxis], 3, axis=2)
|
|
|
|
prediction_true = resize_image(seg_color, img_h_page, img_w_page)
|
|
|
|
prediction_true = resize_image(seg_color, img_h_page, img_w_page)
|
|
|
|
prediction_true = prediction_true.astype(np.uint8)
|
|
|
|
prediction_true = prediction_true.astype(np.uint8)
|
|
|
|
|
|
|
|
return prediction_true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
if img.shape[0] < img_height_model:
|
|
|
|
if img.shape[0] < img_height_model:
|
|
|
|
img = resize_image(img, img_height_model, img.shape[1])
|
|
|
|
img = resize_image(img, img_height_model, img.shape[1])
|
|
|
|
|
|
|
|
|
|
|
|