From bec885b4f183458edaeef0ab2b6f8f17ca735e78 Mon Sep 17 00:00:00 2001 From: breezedeus Date: Sat, 9 Oct 2021 18:06:41 +0800 Subject: [PATCH] fix: modify the judgment logics --- cnocr/models/ocr_model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cnocr/models/ocr_model.py b/cnocr/models/ocr_model.py index 5e99ca0..7a50bd4 100644 --- a/cnocr/models/ocr_model.py +++ b/cnocr/models/ocr_model.py @@ -45,12 +45,12 @@ class EncoderManager(object): assert config is not None and 'name' in config name = config.pop('name') - if name.lower().startswith('densenet-s'): - out_length = config.pop('out_length') - encoder = DenseNet(**config) - elif name.lower().startswith('densenet-lite'): + if name.lower().startswith('densenet-lite'): out_length = config.pop('out_length') encoder = DenseNetLite(**config) + elif name.lower().startswith('densenet'): + out_length = config.pop('out_length') + encoder = DenseNet(**config) else: raise ValueError('not supported encoder name: %s' % name) return encoder, out_length -- GitLab