mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-12-01 08:44:13 +01:00
fix imports from src/cli/cli_*/*_cli
This commit is contained in:
parent
095b36c389
commit
ca83cf934d
4 changed files with 4 additions and 4 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue