{"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/a-text-attention-network-for-spatial","title":"A Text Attention Network for Spatial Deformation Robust Scene Text Image Super-resolution","arxiv_id":"2203.09388","date":"2022-03-17","proceeding":"CVPR 2022 1","authors":["jianqi ma","Zhetong Liang","Lei Zhang"],"abstract":"Scene text image super-resolution aims to increase the resolution and readability of the text in low-resolution images. Though significant improvement has been achieved by deep convolutional neural networks (CNNs), it remains difficult to reconstruct high-resolution images for spatially deformed texts, especially rotated and curve-shaped ones. This is because the current CNN-based methods adopt locality-based operations, which are not effective to deal with the variation caused by deformations. In this paper, we propose a CNN based Text ATTention network (TATT) to address this problem. The semantics of the text are firstly extracted by a text recognition module as text prior information. Then we design a novel transformer-based module, which leverages global attention mechanism, to exert the semantic guidance of text prior to the text reconstruction process. In addition, we propose a text structure consistency loss to refine the visual appearance by imposing structural consistency on the reconstructions of regular and deformed texts. Experiments on the benchmark TextZoom dataset show that the proposed TATT not only achieves state-of-the-art performance in terms of PSNR/SSIM metrics, but also significantly improves the recognition accuracy in the downstream text recognition task, particularly for text instances with multi-orientation and curved shapes. Code is available at https://github.com/mjq11302010044/TATT.","url_abs":"https://arxiv.org/abs/2203.09388v2","url_pdf":"https://arxiv.org/pdf/2203.09388v2.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":"a-text-attention-network-for-spatial","repo_url":"https://github.com/mjq11302010044/tatt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-text-attention-network-for-spatial","repo_url":"https://github.com/zhaominyiz/c3-stisr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-super-resolution","task_name":"Image Super-Resolution"},{"task_slug":"ssim","task_name":"SSIM"},{"task_slug":"super-resolution","task_name":"Super-Resolution"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.09388","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.09388"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhaominyiz/c3-stisr","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mjq11302010044/tatt","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/mjq11302010044/TATT","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":15,"ran_draft_wrong":2,"ran_fixture":1,"unverified":7},"by_repo_kind":{"official":{"samples":19,"ran":14,"repositories":1},"listed":{"samples":6,"ran":4,"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":"72bca38f7becc86d","entry":"ConvEncoder","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"72bca38f7becc86d"}},{"code_sha256_prefix":"debb069fbbbe79b8","entry":"GruBlock","repo":"zhaominyiz/c3-stisr","repo_kind":"listed","path":"model/c3.py","file_url":"https://github.com/zhaominyiz/c3-stisr/blob/HEAD/model/c3.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"debb069fbbbe79b8"}},{"code_sha256_prefix":"b174887b7f685284","entry":"PositionalEncoding","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b174887b7f685284"}},{"code_sha256_prefix":"12b4f9480b2c839e","entry":"RecurrentResidualBlockTL","repo":"zhaominyiz/c3-stisr","repo_kind":"listed","path":"model/c3.py","file_url":"https://github.com/zhaominyiz/c3-stisr/blob/HEAD/model/c3.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"12b4f9480b2c839e"}},{"code_sha256_prefix":"35a157f73c775df0","entry":"SRResConvDecoder","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35a157f73c775df0"}},{"code_sha256_prefix":"ad607f18cb194718","entry":"TPSSpatialTransformer","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"ad607f18cb194718"}},{"code_sha256_prefix":"709bb74fd9d3756c","entry":"TransformerDecoder","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"709bb74fd9d3756c"}},{"code_sha256_prefix":"fc38364146e4b3a4","entry":"TransformerDecoderLayer","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fc38364146e4b3a4"}},{"code_sha256_prefix":"61cf3075977a65fb","entry":"TransformerDecoderLayer_TP","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"61cf3075977a65fb"}},{"code_sha256_prefix":"362e18db540151f7","entry":"TransformerEncoder","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"362e18db540151f7"}},{"code_sha256_prefix":"5d4de4fe8da8b3bc","entry":"TransformerEncoderLayer","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5d4de4fe8da8b3bc"}},{"code_sha256_prefix":"2d273b67edeabc41","entry":"UpsampleBLock","repo":"zhaominyiz/c3-stisr","repo_kind":"listed","path":"model/c3.py","file_url":"https://github.com/zhaominyiz/c3-stisr/blob/HEAD/model/c3.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2d273b67edeabc41"}},{"code_sha256_prefix":"9c3f0411c3daa744","entry":"UpsampleBLock","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9c3f0411c3daa744"}},{"code_sha256_prefix":"c011ff5da6d9bcf3","entry":"_get_clones","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c011ff5da6d9bcf3"}},{"code_sha256_prefix":"e148691b723e906e","entry":"build_output_control_points","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e148691b723e906e"}},{"code_sha256_prefix":"eaa30ce1342b3853","entry":"conv3x3_block","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eaa30ce1342b3853"}},{"code_sha256_prefix":"47ad53774f24d324","entry":"grid_sample","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"47ad53774f24d324"}},{"code_sha256_prefix":"2bc017e584227198","entry":"mish","repo":"zhaominyiz/c3-stisr","repo_kind":"listed","path":"model/c3.py","file_url":"https://github.com/zhaominyiz/c3-stisr/blob/HEAD/model/c3.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2bc017e584227198"}},{"code_sha256_prefix":"d907bd3a32007ddd","entry":"InfoGenTrans","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"d907bd3a32007ddd"}},{"code_sha256_prefix":"a66d691bbfa01975","entry":"InfoTransformer","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"a66d691bbfa01975"}},{"code_sha256_prefix":"ffea63c58c2f8eb8","entry":"ResidualBlock","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"ffea63c58c2f8eb8"}},{"code_sha256_prefix":"297be0ef27a83aa1","entry":"SRTransformer_V4","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"297be0ef27a83aa1"}},{"code_sha256_prefix":"b518b64e684e26e2","entry":"STNHead","repo":"mjq11302010044/TATT","repo_kind":"official","path":"model/transformerSR.py","file_url":"https://github.com/mjq11302010044/TATT/blob/HEAD/model/transformerSR.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":"b518b64e684e26e2"}},{"code_sha256_prefix":"532bb6dd349eb8fe","entry":"TPInterpreter","repo":"zhaominyiz/c3-stisr","repo_kind":"listed","path":"model/c3.py","file_url":"https://github.com/zhaominyiz/c3-stisr/blob/HEAD/model/c3.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"532bb6dd349eb8fe"}},{"code_sha256_prefix":"7764f17a0b0cf401","entry":"TSRN_TL_TRANS","repo":"zhaominyiz/c3-stisr","repo_kind":"listed","path":"model/c3.py","file_url":"https://github.com/zhaominyiz/c3-stisr/blob/HEAD/model/c3.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7764f17a0b0cf401"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}