From 93118497f4f4c8f74cc60b8f3b77671f452ec99a Mon Sep 17 00:00:00 2001 From: tink2123 Date: Wed, 29 Sep 2021 02:48:11 +0000 Subject: [PATCH] fix typo --- configs/rec/rec_resnet_stn_bilstm_att.yml | 2 +- ppocr/modeling/backbones/__init__.py | 6 ++---- tools/program.py | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/configs/rec/rec_resnet_stn_bilstm_att.yml b/configs/rec/rec_resnet_stn_bilstm_att.yml index b18bb685..1f6e534a 100644 --- a/configs/rec/rec_resnet_stn_bilstm_att.yml +++ b/configs/rec/rec_resnet_stn_bilstm_att.yml @@ -37,7 +37,7 @@ Optimizer: Architecture: model_type: rec - algorithm: seed + algorithm: SEED Transform: name: STN_ON tps_inputsize: [32, 64] diff --git a/ppocr/modeling/backbones/__init__.py b/ppocr/modeling/backbones/__init__.py index d9815021..169eb821 100755 --- a/ppocr/modeling/backbones/__init__.py +++ b/ppocr/modeling/backbones/__init__.py @@ -28,9 +28,10 @@ def build_backbone(config, model_type): from .rec_mv1_enhance import MobileNetV1Enhance from .rec_nrtr_mtb import MTB from .rec_resnet_31 import ResNet31 + from .rec_resnet_aster import ResNet_ASTER support_dict = [ 'MobileNetV1Enhance', 'MobileNetV3', 'ResNet', 'ResNetFPN', 'MTB', - "ResNet31" + "ResNet31", "ResNet_ASTER" ] elif model_type == "e2e": from .e2e_resnet_vd_pg import ResNet @@ -39,9 +40,6 @@ def build_backbone(config, model_type): from .table_resnet_vd import ResNet from .table_mobilenet_v3 import MobileNetV3 support_dict = ["ResNet", "MobileNetV3"] - elif model_type == "seed": - from .rec_resnet_aster import ResNet_ASTER - support_dict = ["ResNet_ASTER"] else: raise NotImplementedError diff --git a/tools/program.py b/tools/program.py index 8750dd9a..4df87c16 100755 --- a/tools/program.py +++ b/tools/program.py @@ -402,8 +402,7 @@ def preprocess(is_train=False): assert alg in [ 'EAST', 'DB', 'SAST', 'Rosetta', 'CRNN', 'STARNet', 'RARE', 'SRN', 'CLS', 'PGNet', 'Distillation', 'NRTR', 'TableAttn', 'SAR', 'PSE', - 'ASTER' - ] + 'SEED'] device = 'gpu:{}'.format(dist.ParallelEnv().dev_id) if use_gpu else 'cpu' device = paddle.set_device(device) -- GitLab