{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/focus-on-the-whole-character-discriminative","title":"Focus on the Whole Character: Discriminative Character Modeling for Scene Text Recognition","arxiv_id":"2407.05562","date":"2024-07-08","proceeding":null,"authors":["Bangbang Zhou","Yadong Qu","Zixiao Wang","Zicheng Li","Boqiang Zhang","Hongtao Xie"],"abstract":"Recently, scene text recognition (STR) models have shown significant performance improvements. However, existing models still encounter difficulties in recognizing challenging texts that involve factors such as severely distorted and perspective characters. These challenging texts mainly cause two problems: (1) Large Intra-Class Variance. (2) Small Inter-Class Variance. An extremely distorted character may prominently differ visually from other characters within the same category, while the variance between characters from different classes is relatively small. To address the above issues, we propose a novel method that enriches the character features to enhance the discriminability of characters. Firstly, we propose the Character-Aware Constraint Encoder (CACE) with multiple blocks stacked. CACE introduces a decay matrix in each block to explicitly guide the attention region for each token. By continuously employing the decay matrix, CACE enables tokens to perceive morphological information at the character level. Secondly, an Intra-Inter Consistency Loss (I^2CL) is introduced to consider intra-class compactness and inter-class separability at feature space. I^2CL improves the discriminative capability of features by learning a long-term memory unit for each character category. Trained with synthetic data, our model achieves state-of-the-art performance on common benchmarks (94.1% accuracy) and Union14M-Benchmark (61.6% accuracy). Code is available at https://github.com/bang123-box/CFE.","url_abs":"https://arxiv.org/abs/2407.05562v1","url_pdf":"https://arxiv.org/pdf/2407.05562v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"focus-on-the-whole-character-discriminative","repo_url":"https://github.com/bang123-box/cfe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"scene-text-recognition","task_name":"Scene Text Recognition"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2407.05562","atlas_url":"https://app.syntology.ai/?focus=2407.05562","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.05562"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/bang123-box/CFE","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":3,"unverified":3},"by_repo_kind":{"official":{"samples":6,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"6bde3fc89b83594b","entry":"ConvBNLayer","repo":"bang123-box/CFE","repo_kind":"official","path":"strhub/models/cfe/modules.py","file_url":"https://github.com/bang123-box/CFE/blob/HEAD/strhub/models/cfe/modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6bde3fc89b83594b"}},{"code_sha256_prefix":"368e8872aa996b9e","entry":"rotate_every_two","repo":"bang123-box/CFE","repo_kind":"official","path":"strhub/models/cfe/modules.py","file_url":"https://github.com/bang123-box/CFE/blob/HEAD/strhub/models/cfe/modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"368e8872aa996b9e"}},{"code_sha256_prefix":"5d8396d548dcd91a","entry":"theta_shift","repo":"bang123-box/CFE","repo_kind":"official","path":"strhub/models/cfe/modules.py","file_url":"https://github.com/bang123-box/CFE/blob/HEAD/strhub/models/cfe/modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5d8396d548dcd91a"}},{"code_sha256_prefix":"d3ac19ee3684a0ad","entry":"create_model","repo":"bang123-box/CFE","repo_kind":"official","path":"strhub/models/utils.py","file_url":"https://github.com/bang123-box/CFE/blob/HEAD/strhub/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d3ac19ee3684a0ad"}},{"code_sha256_prefix":"83d15f3d9d2da060","entry":"get_pretrained_weights","repo":"bang123-box/CFE","repo_kind":"official","path":"strhub/models/utils.py","file_url":"https://github.com/bang123-box/CFE/blob/HEAD/strhub/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"83d15f3d9d2da060"}},{"code_sha256_prefix":"16bc572b3ef26ada","entry":"load_from_checkpoint","repo":"bang123-box/CFE","repo_kind":"official","path":"strhub/models/utils.py","file_url":"https://github.com/bang123-box/CFE/blob/HEAD/strhub/models/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16bc572b3ef26ada"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}