mirror of
https://github.com/qurator-spk/sbb_pixelwise_segmentation.git
synced 2025-06-09 20:00:05 +02:00
resolving typo
This commit is contained in:
parent
c0faecec2c
commit
647a3f8cc4
1 changed files with 7 additions and 6 deletions
|
@ -304,8 +304,9 @@ def get_images_of_ground_truth(gt_list, dir_in, output_dir, output_type, config_
|
||||||
|
|
||||||
if config_file and config_params['use_case']=='layout':
|
if config_file and config_params['use_case']=='layout':
|
||||||
keys = list(config_params.keys())
|
keys = list(config_params.keys())
|
||||||
if "artificial_class_on_boundry" in keys:
|
|
||||||
elements_with_artificial_class = list(config_params['artificial_class_on_boundry'])
|
if "artificial_class_on_boundary" in keys:
|
||||||
|
elements_with_artificial_class = list(config_params['artificial_class_on_boundary'])
|
||||||
artificial_class_rgb_color = (255,255,0)
|
artificial_class_rgb_color = (255,255,0)
|
||||||
artificial_class_label = config_params['artificial_class_label']
|
artificial_class_label = config_params['artificial_class_label']
|
||||||
#values = config_params.values()
|
#values = config_params.values()
|
||||||
|
@ -568,7 +569,7 @@ def get_images_of_ground_truth(gt_list, dir_in, output_dir, output_type, config_
|
||||||
break
|
break
|
||||||
co_noise.append(np.array(c_t_in))
|
co_noise.append(np.array(c_t_in))
|
||||||
|
|
||||||
if "artificial_class_on_boundry" in keys:
|
if "artificial_class_on_boundary" in keys:
|
||||||
img_boundary = np.zeros( (y_len,x_len) )
|
img_boundary = np.zeros( (y_len,x_len) )
|
||||||
if "paragraph" in elements_with_artificial_class:
|
if "paragraph" in elements_with_artificial_class:
|
||||||
erosion_rate = 2
|
erosion_rate = 2
|
||||||
|
@ -655,7 +656,7 @@ def get_images_of_ground_truth(gt_list, dir_in, output_dir, output_type, config_
|
||||||
img_poly=cv2.fillPoly(img, pts =co_text[element_text], color=color_label)
|
img_poly=cv2.fillPoly(img, pts =co_text[element_text], color=color_label)
|
||||||
|
|
||||||
|
|
||||||
if "artificial_class_on_boundry" in keys:
|
if "artificial_class_on_boundary" in keys:
|
||||||
img_poly[:,:,0][img_boundary[:,:]==1] = artificial_class_rgb_color[0]
|
img_poly[:,:,0][img_boundary[:,:]==1] = artificial_class_rgb_color[0]
|
||||||
img_poly[:,:,1][img_boundary[:,:]==1] = artificial_class_rgb_color[1]
|
img_poly[:,:,1][img_boundary[:,:]==1] = artificial_class_rgb_color[1]
|
||||||
img_poly[:,:,2][img_boundary[:,:]==1] = artificial_class_rgb_color[2]
|
img_poly[:,:,2][img_boundary[:,:]==1] = artificial_class_rgb_color[2]
|
||||||
|
@ -706,7 +707,7 @@ def get_images_of_ground_truth(gt_list, dir_in, output_dir, output_type, config_
|
||||||
color_label = config_params['textregions'][element_text]
|
color_label = config_params['textregions'][element_text]
|
||||||
img_poly=cv2.fillPoly(img, pts =co_text[element_text], color=color_label)
|
img_poly=cv2.fillPoly(img, pts =co_text[element_text], color=color_label)
|
||||||
|
|
||||||
if "artificial_class_on_boundry" in keys:
|
if "artificial_class_on_boundary" in keys:
|
||||||
img_poly[:,:][img_boundary[:,:]==1] = artificial_class_label
|
img_poly[:,:][img_boundary[:,:]==1] = artificial_class_label
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue