|
|
|
@ -97,6 +97,12 @@ def binarization(patches, model_dir, input_image, output_image, dir_in, dir_out)
|
|
|
|
|
type=click.Path(exists=True, file_okay=False),
|
|
|
|
|
required=True,
|
|
|
|
|
)
|
|
|
|
|
@click.option(
|
|
|
|
|
"--overwrite",
|
|
|
|
|
"-O",
|
|
|
|
|
help="overwrite (instead of skipping) if output xml exists",
|
|
|
|
|
is_flag=True,
|
|
|
|
|
)
|
|
|
|
|
@click.option(
|
|
|
|
|
"--dir_in",
|
|
|
|
|
"-di",
|
|
|
|
@ -253,7 +259,7 @@ def binarization(patches, model_dir, input_image, output_image, dir_in, dir_out)
|
|
|
|
|
help="Override log level globally to this",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
def layout(image, out, dir_in, model, save_images, save_layout, save_deskewed, save_all, extract_only_images, save_page, enable_plotting, allow_enhancement, curved_line, textline_light, full_layout, tables, right2left, input_binary, allow_scaling, headers_off, light_version, reading_order_machine_based, do_ocr, num_col_upper, num_col_lower, skip_layout_and_reading_order, ignore_page_extraction, log_level):
|
|
|
|
|
def layout(image, out, overwrite, dir_in, model, save_images, save_layout, save_deskewed, save_all, extract_only_images, save_page, enable_plotting, allow_enhancement, curved_line, textline_light, full_layout, tables, right2left, input_binary, allow_scaling, headers_off, light_version, reading_order_machine_based, do_ocr, num_col_upper, num_col_lower, skip_layout_and_reading_order, ignore_page_extraction, log_level):
|
|
|
|
|
initLogging()
|
|
|
|
|
if log_level:
|
|
|
|
|
getLogger('eynollah').setLevel(getLevelName(log_level))
|
|
|
|
@ -273,6 +279,7 @@ def layout(image, out, dir_in, model, save_images, save_layout, save_deskewed, s
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
eynollah = Eynollah(
|
|
|
|
|
image_filename=image,
|
|
|
|
|
overwrite=overwrite,
|
|
|
|
|
dir_out=out,
|
|
|
|
|
dir_in=dir_in,
|
|
|
|
|
dir_models=model,
|
|
|
|
|