Merge pull request #55 from qurator-spk/resolve-resources

processor: self.resolve_resource model
pull/57/head
vahidrezanezhad 4 years ago committed by GitHub
commit 95d8f7021f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,6 +46,7 @@ class OcrdSbbTextlineDetectorRecognize(Processor):
log = getLogger('processor.OcrdSbbTextlineDetectorRecognize')
assert_file_grp_cardinality(self.input_file_grp, 1)
assert_file_grp_cardinality(self.output_file_grp, 1)
model = self.resolve_resource(self.parameter['model'])
for (n, input_file) in enumerate(self.input_files):
page_id = input_file.pageId or input_file.ID
@ -73,7 +74,6 @@ class OcrdSbbTextlineDetectorRecognize(Processor):
page_image.save(image_file)
# Segment the image
model = self.parameter['model']
x = textline_detector(image_file, tmp_dirname, file_id, model)
x.run()

@ -9,5 +9,5 @@ scikit-learn
numpy == 1.18.* # XXX for tensorflow-gpu 1.15
tensorflow-gpu == 1.15.*
scipy
ocrd >= 2.18.0
ocrd >= 2.22.3
shapely >= 1.7.1

Loading…
Cancel
Save