mirror of
https://github.com/qurator-spk/sbb_pixelwise_segmentation.git
synced 2025-06-13 13:50:07 +02:00
min area size of text region passes as an argument for machine based reading order
This commit is contained in:
parent
29ddd4d909
commit
356da4cc53
1 changed files with 10 additions and 4 deletions
|
@ -116,22 +116,28 @@ def image_enhancement(dir_imgs, dir_out_images, dir_out_labels, scales):
|
|||
@click.option(
|
||||
"--input_height",
|
||||
"-ih",
|
||||
help="input_height",
|
||||
help="input height",
|
||||
)
|
||||
@click.option(
|
||||
"--input_width",
|
||||
"-iw",
|
||||
help="input_width",
|
||||
help="input width",
|
||||
)
|
||||
@click.option(
|
||||
"--min_area_size",
|
||||
"-min",
|
||||
help="min area size of regions considered for reading order training.",
|
||||
)
|
||||
|
||||
def machine_based_reading_order(dir_xml, dir_out_modal_image, dir_out_classes, input_height, input_width):
|
||||
def machine_based_reading_order(dir_xml, dir_out_modal_image, dir_out_classes, input_height, input_width, min_area_size):
|
||||
xml_files_ind = os.listdir(dir_xml)
|
||||
input_height = int(input_height)
|
||||
input_width = int(input_width)
|
||||
min_area = float(min_area_size)
|
||||
|
||||
indexer_start= 0#55166
|
||||
max_area = 1
|
||||
min_area = 0.0001
|
||||
#min_area = 0.0001
|
||||
|
||||
for ind_xml in tqdm(xml_files_ind):
|
||||
indexer = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue