Skip to content

Commit

Permalink
remove fileGrp cardinality assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky authored Aug 13, 2024
1 parent cd0ce01 commit 4671e98
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
5 changes: 0 additions & 5 deletions ocrd_kraken/binarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ class KrakenBinarize(Processor):
def executable(self):
return 'ocrd-kraken-binarize'

def setup(self):
self.logger = getLogger('processor.KrakenBinarize')
assert_file_grp_cardinality(self.input_file_grp, 1)
assert_file_grp_cardinality(self.output_file_grp, 1)

def process_page_pcgts(self, *input_pcgts : OcrdPage, output_file_id : Optional[str] = None, page_id : Optional[str] = None) -> OcrdPage:
"""Binarize the pages/regions/lines with Kraken.
Expand Down
4 changes: 1 addition & 3 deletions ocrd_kraken/recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ def executable(self):

def setup(self):
"""
Assert filegrp cardinality, load model, set predict function
Load model, set predict function
"""
assert_file_grp_cardinality(self.input_file_grp, 1)
assert_file_grp_cardinality(self.output_file_grp, 1)

self.logger = getLogger('processor.KrakenRecognize')
import torch
Expand Down
2 changes: 0 additions & 2 deletions ocrd_kraken/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ def setup(self):
Load models
"""
self.logger = getLogger('processor.KrakenSegment')
assert_file_grp_cardinality(self.input_file_grp, 1)
assert_file_grp_cardinality(self.output_file_grp, 1)
kwargs = {}
kwargs['text_direction'] = self.parameter['text_direction']
self.use_legacy = self.parameter['use_legacy']
Expand Down

0 comments on commit 4671e98

Please sign in to comment.