mirror of
https://github.com/mikegerber/ocrd_calamari.git
synced 2025-06-09 19:59:53 +02:00
🚧 Update to ocrd >= 1.0.0b11
This commit is contained in:
parent
f62332223b
commit
4df04ac6d7
2 changed files with 8 additions and 8 deletions
|
@ -7,12 +7,12 @@ import numpy as np
|
|||
from calamari_ocr.ocr import MultiPredictor
|
||||
from calamari_ocr.ocr.voting import voter_from_proto
|
||||
from calamari_ocr.proto import VoterParams
|
||||
from ocrd import Processor, MIMETYPE_PAGE
|
||||
from ocrd.logging import getLogger
|
||||
from ocrd.model import ocrd_page
|
||||
from ocrd.model.ocrd_page import to_xml
|
||||
from ocrd.model.ocrd_page_generateds import TextEquivType
|
||||
from ocrd.utils import polygon_from_points, concat_padded
|
||||
from ocrd import Processor
|
||||
from ocrd_modelfactory import page_from_file
|
||||
from ocrd_models import ocrd_page
|
||||
from ocrd_models.ocrd_page import to_xml
|
||||
from ocrd_models.ocrd_page_generateds import TextEquivType
|
||||
from ocrd_utils import getLogger, concat_padded, polygon_from_points, MIMETYPE_PAGE
|
||||
|
||||
from ocrd_calamari.config import OCRD_TOOL
|
||||
|
||||
|
@ -53,7 +53,7 @@ class CalamariOcr(Processor):
|
|||
|
||||
for (n, input_file) in enumerate(self.input_files):
|
||||
log.info("INPUT FILE %i / %s", n, input_file)
|
||||
pcgts = ocrd_page.from_file(self.workspace.download_file(input_file))
|
||||
pcgts = page_from_file(self.workspace.download_file(input_file))
|
||||
image_url = pcgts.get_Page().imageFilename
|
||||
log.info("pcgts %s", pcgts)
|
||||
for region in pcgts.get_Page().get_TextRegion():
|
||||
|
|
|
@ -2,4 +2,4 @@ numpy
|
|||
calamari-ocr
|
||||
tensorflow-gpu
|
||||
click
|
||||
ocrd
|
||||
ocrd >= 1.0.0b11
|
Loading…
Add table
Add a link
Reference in a new issue