From f8ade5d3da2649baf47efa62916a1c7d62a14f3d Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:19:30 +0200 Subject: [PATCH 1/2] ocrd-tool.json: register SavedModel resources --- sbb_binarize/ocrd-tool.json | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sbb_binarize/ocrd-tool.json b/sbb_binarize/ocrd-tool.json index 158cb07..2c02d12 100644 --- a/sbb_binarize/ocrd-tool.json +++ b/sbb_binarize/ocrd-tool.json @@ -17,13 +17,31 @@ "description": "PAGE XML hierarchy level to operate on" }, "model": { - "description": "Directory containing HDF5 models. Can be an absolute path or a path relative to the current working directory or $SBB_BINARIZE_DATA environment variable (if set)", + "description": "Directory containing HDF5 or SavedModel/ProtoBuf models. Can be an absolute path or a path relative to the OCR-D resource location, the current working directory or the $SBB_BINARIZE_DATA environment variable (if set)", "type": "string", "format": "uri", "content-type": "text/directory", "required": true } - } + }, + "resources": [ + { + "url": "https://github.com/apacha/sbb_binarization/releases/download/pre-trained-models/model_2020_01_16.zip", + "name": "default", + "type": "archive", + "path_in_archive": "model_2020_01_16", + "size": 562917559, + "description": "default models provided by github.com/qurator-spk" + }, + { + "url": "https://github.com/apacha/sbb_binarization/releases/download/pre-trained-models/model_2021_03_09.zip", + "name": "default-2021-03-09", + "type": "archive", + "path_in_archive": ".", + "size": 133693693, + "description": "updated default models provided by github.com/qurator-spk" + } + ] } } } From 743ca0dbed6b905552bdf5195afa996e55881241 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:20:31 +0200 Subject: [PATCH 2/2] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a847f92..2f57afe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ numpy setuptools >= 41 opencv-python-headless -ocrd >= 2.22.3 +ocrd >= 2.38.0 tensorflow >= 2.4.0