{"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/don-t-forget-me-accurate-background-recovery","title":"Don't Forget Me: Accurate Background Recovery for Text Removal via Modeling Local-Global Context","arxiv_id":"2207.10273","date":"2022-07-21","proceeding":null,"authors":["Chongyu Liu","Lianwen Jin","Yuliang Liu","Canjie Luo","Bangdong Chen","Fengjun Guo","Kai Ding"],"abstract":"Text removal has attracted increasingly attention due to its various applications on privacy protection, document restoration, and text editing. It has shown significant progress with deep neural network. However, most of the existing methods often generate inconsistent results for complex background. To address this issue, we propose a Contextual-guided Text Removal Network, termed as CTRNet. CTRNet explores both low-level structure and high-level discriminative context feature as prior knowledge to guide the process of background restoration. We further propose a Local-global Content Modeling (LGCM) block with CNNs and Transformer-Encoder to capture local features and establish the long-term relationship among pixels globally. Finally, we incorporate LGCM with context guidance for feature modeling and decoding. Experiments on benchmark datasets, SCUT-EnsText and SCUT-Syn show that CTRNet significantly outperforms the existing state-of-the-art methods. Furthermore, a qualitative experiment on examination papers also demonstrates the generalization ability of our method. The codes and supplement materials are available at https://github.com/lcy0604/CTRNet.","url_abs":"https://arxiv.org/abs/2207.10273v1","url_pdf":"https://arxiv.org/pdf/2207.10273v1.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":"don-t-forget-me-accurate-background-recovery","repo_url":"https://github.com/lcy0604/ctrnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2207.10273","atlas_url":"https://app.syntology.ai/?focus=2207.10273","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.10273"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lcy0604/ctrnet","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/lcy0604/CTRNet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"unverified":13},"by_repo_kind":{"official":{"samples":22,"ran":9,"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":"06eae0ae5e115c24","entry":"AdversarialLoss","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"06eae0ae5e115c24"}},{"code_sha256_prefix":"135239d29145820a","entry":"ConvWithActivation","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"135239d29145820a"}},{"code_sha256_prefix":"94b5cbe5237f7e9d","entry":"ConvWithActivation_encode","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"none","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"94b5cbe5237f7e9d"}},{"code_sha256_prefix":"fa209b1538963765","entry":"D_Net","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"none","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fa209b1538963765"}},{"code_sha256_prefix":"28816304c3e4e4bc","entry":"DenseLayer","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"28816304c3e4e4bc"}},{"code_sha256_prefix":"7cc637107bac1c93","entry":"LateralConnect","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"7cc637107bac1c93"}},{"code_sha256_prefix":"b4ca9a91816f9d68","entry":"PositionEmbeddingSine","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"b4ca9a91816f9d68"}},{"code_sha256_prefix":"0cd90b435a362538","entry":"RDB","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"0cd90b435a362538"}},{"code_sha256_prefix":"6d01e64cec5bf46c","entry":"ResnetBlock","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"6d01e64cec5bf46c"}},{"code_sha256_prefix":"4635cdc63b1df831","entry":"CTRNet","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"4635cdc63b1df831"}},{"code_sha256_prefix":"e503b02c4552fae1","entry":"ConvTD_SPADE_refine","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"e503b02c4552fae1"}},{"code_sha256_prefix":"c15346bf36f3790c","entry":"ConvTE_spade","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"c15346bf36f3790c"}},{"code_sha256_prefix":"08bef43cba4a315e","entry":"DeConvWithActivation","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"08bef43cba4a315e"}},{"code_sha256_prefix":"c33bbf8c045f74d5","entry":"Downsample_connect","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"c33bbf8c045f74d5"}},{"code_sha256_prefix":"8d65710b92ac9ee8","entry":"G_Net","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"8d65710b92ac9ee8"}},{"code_sha256_prefix":"c927665bd23c28e5","entry":"ResnetBlock_Spade","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"c927665bd23c28e5"}},{"code_sha256_prefix":"6c9dabcd0790d01f","entry":"SPADE","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"6c9dabcd0790d01f"}},{"code_sha256_prefix":"ac4a7e0a62602134","entry":"StructureGen","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"ac4a7e0a62602134"}},{"code_sha256_prefix":"8432e0f043a686c3","entry":"TransformerEncoderLayer","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"8432e0f043a686c3"}},{"code_sha256_prefix":"8e1316c982cfa4fe","entry":"VGG16FeatureExtractor","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"8e1316c982cfa4fe"}},{"code_sha256_prefix":"b38b74ab50f7c296","entry":"_get_activation_fn","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"b38b74ab50f7c296"}},{"code_sha256_prefix":"a8929ba31c8b7c2b","entry":"create_model","repo":"lcy0604/CTRNet","repo_kind":"official","path":"models_CTRNet.py","file_url":"https://github.com/lcy0604/CTRNet/blob/HEAD/models_CTRNet.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":"a8929ba31c8b7c2b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}