resolving typo

pull/18/head
vahidrezanezhad 6 months ago
parent c0faecec2c
commit 647a3f8cc4

@ -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':
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_label = config_params['artificial_class_label']
#values = config_params.values()
@ -568,7 +569,7 @@ def get_images_of_ground_truth(gt_list, dir_in, output_dir, output_type, config_
break
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) )
if "paragraph" in elements_with_artificial_class:
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)
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[:,:,1][img_boundary[:,:]==1] = artificial_class_rgb_color[1]
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]
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

Loading…
Cancel
Save