fix imports from src/cli/cli_*/*_cli

This commit is contained in:
kba 2025-11-26 20:48:14 +01:00
parent 095b36c389
commit ca83cf934d
4 changed files with 4 additions and 4 deletions

View file

@ -32,7 +32,7 @@ def binarize_cli(
""" """
Binarize images with a ML model Binarize images with a ML model
""" """
from eynollah.sbb_binarize import SbbBinarizer from ..sbb_binarize import SbbBinarizer
assert bool(input_image) != bool(dir_in), "Either -i (single input) or -di (directory) must be provided, but not both." assert bool(input_image) != bool(dir_in), "Either -i (single input) or -di (directory) must be provided, but not both."
binarizer = SbbBinarizer(model_zoo=ctx.obj.model_zoo) binarizer = SbbBinarizer(model_zoo=ctx.obj.model_zoo)
binarizer.run( binarizer.run(

View file

@ -48,7 +48,7 @@ def enhance_cli(ctx, image, out, overwrite, dir_in, num_col_upper, num_col_lower
Enhance image Enhance image
""" """
assert bool(image) != bool(dir_in), "Either -i (single input) or -di (directory) must be provided, but not both." assert bool(image) != bool(dir_in), "Either -i (single input) or -di (directory) must be provided, but not both."
from .image_enhancer import Enhancer from ..image_enhancer import Enhancer
enhancer = Enhancer( enhancer = Enhancer(
model_zoo=ctx.obj.model_zoo, model_zoo=ctx.obj.model_zoo,
num_col_upper=num_col_upper, num_col_upper=num_col_upper,

View file

@ -113,7 +113,7 @@ def ocr_cli(
assert not export_textline_images_and_text or not dir_in_bin, "Exporting textline and text -etit can not be set alongside directory of bin images -dib" assert not export_textline_images_and_text or not dir_in_bin, "Exporting textline and text -etit can not be set alongside directory of bin images -dib"
assert not export_textline_images_and_text or not dir_out_image_text, "Exporting textline and text -etit can not be set alongside directory of images with predicted text -doit" assert not export_textline_images_and_text or not dir_out_image_text, "Exporting textline and text -etit can not be set alongside directory of images with predicted text -doit"
assert bool(image) != bool(dir_in), "Either -i (single image) or -di (directory) must be provided, but not both." assert bool(image) != bool(dir_in), "Either -i (single image) or -di (directory) must be provided, but not both."
from .eynollah_ocr import Eynollah_ocr from ..eynollah_ocr import Eynollah_ocr
eynollah_ocr = Eynollah_ocr( eynollah_ocr = Eynollah_ocr(
model_zoo=ctx.obj.model_zoo, model_zoo=ctx.obj.model_zoo,
tr_ocr=tr_ocr, tr_ocr=tr_ocr,

View file

@ -25,7 +25,7 @@ def readingorder_cli(ctx, input, dir_in, out):
""" """
Generate ReadingOrder with a ML model Generate ReadingOrder with a ML model
""" """
from eynollah.mb_ro_on_layout import machine_based_reading_order_on_layout from ..mb_ro_on_layout import machine_based_reading_order_on_layout
assert bool(input) != bool(dir_in), "Either -i (single input) or -di (directory) must be provided, but not both." assert bool(input) != bool(dir_in), "Either -i (single input) or -di (directory) must be provided, but not both."
orderer = machine_based_reading_order_on_layout(model_zoo=ctx.obj.model_zoo) orderer = machine_based_reading_order_on_layout(model_zoo=ctx.obj.model_zoo)
orderer.run(xml_filename=input, orderer.run(xml_filename=input,