diff --git a/ppocr/utils/character.py b/ppocr/utils/character.py index 2db0151e62ced347cfbda2d8be9d49e1e6b40690..c7c93fc557604a32d12343d929c119fd787ee126 100755 --- a/ppocr/utils/character.py +++ b/ppocr/utils/character.py @@ -26,7 +26,7 @@ class CharacterOps(object): self.character_type = config['character_type'] self.loss_type = config['loss_type'] self.max_text_len = config['max_text_length'] - if self.loss_type == "srn" and self.character_type == "ch": + if self.loss_type == "srn" and self.character_type != "en": raise Exception("SRN can only support in character_type == en") if self.character_type == "en": self.character_str = "0123456789abcdefghijklmnopqrstuvwxyz"