mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-06-16 09:59:13 +02:00
models w/ multiple inputs yield a tuple for .input_shape
This commit is contained in:
parent
08946067ac
commit
45c92eada2
2 changed files with 4 additions and 2 deletions
|
|
@ -166,7 +166,8 @@ class Eynollah_ocr(Eynollah):
|
|||
page_tree: ET.ElementTree,
|
||||
page_ns,
|
||||
) -> EynollahOcrResult:
|
||||
_, image_height, image_width, _ = self.model_zoo.get('ocr').input_shape
|
||||
input_shape, _ = self.model_zoo.get('ocr').input_shape
|
||||
_, image_height, image_width, _ = input_shape
|
||||
|
||||
total_bb_coordinates = []
|
||||
cropped_lines_rgb = []
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ def test_cnnrnnocr1(
|
|||
model = model_zoo.get('ocr')
|
||||
assert isinstance(model, Predictor)
|
||||
shape = model.input_shape
|
||||
assert len(shape) == 4
|
||||
assert len(shape) == 2
|
||||
assert len(shape[0]) == 4
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue