Merge pull request #6 from cneud/cneud-rename_textlineerkenner

refactor class name
pull/13/head
vahidrezanezhad 5 years ago committed by GitHub
commit a74974b7b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,7 +38,7 @@ __doc__ = \
""" """
class textlineerkenner: class textline_detector:
def __init__(self, image_dir, dir_out, f_name, dir_models): def __init__(self, image_dir, dir_out, f_name, dir_models):
self.image_dir = image_dir # XXX This does not seem to be a directory as the name suggests, but a file self.image_dir = image_dir # XXX This does not seem to be a directory as the name suggests, but a file
self.dir_out = dir_out self.dir_out = dir_out
@ -1475,7 +1475,7 @@ class textlineerkenner:
def main(image, out, model): def main(image, out, model):
possibles = globals() # XXX unused? possibles = globals() # XXX unused?
possibles.update(locals()) possibles.update(locals())
x = textlineerkenner(image, out, None, model) x = textline_detector(image, out, None, model)
x.run() x.run()

@ -12,7 +12,7 @@ from ocrd_models.ocrd_page_generateds import MetadataItemType, LabelsType, Label
from ocrd_utils import concat_padded, getLogger, MIMETYPE_PAGE from ocrd_utils import concat_padded, getLogger, MIMETYPE_PAGE
from pkg_resources import resource_string from pkg_resources import resource_string
from qurator.sbb_textline_detector import textlineerkenner from qurator.sbb_textline_detector import textline_detector
log = getLogger('processor.OcrdSbbTextlineDetectorRecognize') log = getLogger('processor.OcrdSbbTextlineDetectorRecognize')
@ -67,7 +67,7 @@ class OcrdSbbTextlineDetectorRecognize(Processor):
# Segment the image # Segment the image
image_file = self._resolve_image_file(input_file) image_file = self._resolve_image_file(input_file)
model = self.parameter['model'] model = self.parameter['model']
x = textlineerkenner(image_file, tmp_dirname, file_id, model) x = textline_detector(image_file, tmp_dirname, file_id, model)
x.run() x.run()
# Read segmentation results # Read segmentation results

Loading…
Cancel
Save