Closed fancyerii closed 6 years ago
有效的字符是a-zA-Z0-9 62个,然后加上一个空(epsilon),共63个。我测试了一下把它改成63,效果没有任何变化。
$ git diff diff --git a/lib/lstm/config.py b/lib/lstm/config.py index 3b1a322..e61cc3b 100644 --- a/lib/lstm/config.py +++ b/lib/lstm/config.py @@ -20,7 +20,7 @@ C.IMG_HEIGHT = 32 C.MAX_CHAR_LEN = 6 C.BLANK_TOKEN=0 C.CHARSET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' -C.NCLASSES = len(C.CHARSET)+2 +C.NCLASSES = len(C.CHARSET)+1
https://github.com/ilovin/lstm_ctc_ocr/issues/35 https://github.com/ilovin/lstm_ctc_ocr/issues/49 it's only a trick
哦,是为了兼容warpctc和tf的ctc。
有效的字符是a-zA-Z0-9 62个,然后加上一个空(epsilon),共63个。我测试了一下把它改成63,效果没有任何变化。
$ git diff diff --git a/lib/lstm/config.py b/lib/lstm/config.py index 3b1a322..e61cc3b 100644 --- a/lib/lstm/config.py +++ b/lib/lstm/config.py @@ -20,7 +20,7 @@ C.IMG_HEIGHT = 32 C.MAX_CHAR_LEN = 6 C.BLANK_TOKEN=0 C.CHARSET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' -C.NCLASSES = len(C.CHARSET)+2 +C.NCLASSES = len(C.CHARSET)+1