{"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/tpfnet-a-novel-text-in-painting-transformer","title":"TPFNet: A Novel Text In-painting Transformer for Text Removal","arxiv_id":"2210.14461","date":"2022-10-26","proceeding":null,"authors":["Onkar Susladkar","Dhruv Makwana","Gayatri Deshmukh","Sparsh Mittal","Sai Chandra Teja R","Rekha Singhal"],"abstract":"Text erasure from an image is helpful for various tasks such as image editing and privacy preservation. In this paper, we present TPFNet, a novel one-stage (end-toend) network for text removal from images. Our network has two parts: feature synthesis and image generation. Since noise can be more effectively removed from low-resolution images, part 1 operates on low-resolution images. The output of part 1 is a low-resolution text-free image. Part 2 uses the features learned in part 1 to predict a high-resolution text-free image. In part 1, we use \"pyramidal vision transformer\" (PVT) as the encoder. Further, we use a novel multi-headed decoder that generates a high-pass filtered image and a segmentation map, in addition to a text-free image. The segmentation branch helps locate the text precisely, and the high-pass branch helps in learning the image structure. To precisely locate the text, TPFNet employs an adversarial loss that is conditional on the segmentation map rather than the input image. On Oxford, SCUT, and SCUT-EnsText datasets, our network outperforms recently proposed networks on nearly all the metrics. For example, on SCUT-EnsText dataset, TPFNet has a PSNR (higher is better) of 39.0 and text-detection precision (lower is better) of 21.1, compared to the best previous technique, which has a PSNR of 32.3 and precision of 53.2. The source code can be obtained from https://github.com/CandleLabAI/TPFNet","url_abs":"https://arxiv.org/abs/2210.14461v2","url_pdf":"https://arxiv.org/pdf/2210.14461v2.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":"tpfnet-a-novel-text-in-painting-transformer","repo_url":"https://github.com/candlelabai/tpfnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"text-detection","task_name":"Text Detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.14461","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.14461"}},"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":"deterministic:regex_extraction","url":"https://github.com/CandleLabAI/TPFNet","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/candlelabai/tpfnet","reach":{"status":"ok"}}],"summary":{"ran":5,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"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":7,"samples":[{"code_sha256_prefix":"87ca3b7208398a21","entry":"ConvbnGelu","repo":"candlelabai/tpfnet","repo_kind":"official","path":"model.py","file_url":"https://github.com/candlelabai/tpfnet/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"87ca3b7208398a21"}},{"code_sha256_prefix":"50d892a2059c5bfb","entry":"DecoderBlock","repo":"candlelabai/tpfnet","repo_kind":"official","path":"model.py","file_url":"https://github.com/candlelabai/tpfnet/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"50d892a2059c5bfb"}},{"code_sha256_prefix":"3c6194978eb992a5","entry":"GBlock","repo":"candlelabai/tpfnet","repo_kind":"official","path":"model.py","file_url":"https://github.com/candlelabai/tpfnet/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3c6194978eb992a5"}},{"code_sha256_prefix":"c8e6f1f6b88d9f46","entry":"ResidualBlock","repo":"candlelabai/tpfnet","repo_kind":"official","path":"model.py","file_url":"https://github.com/candlelabai/tpfnet/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c8e6f1f6b88d9f46"}},{"code_sha256_prefix":"70200e0930cad8d3","entry":"SEAttention","repo":"candlelabai/tpfnet","repo_kind":"official","path":"model.py","file_url":"https://github.com/candlelabai/tpfnet/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"70200e0930cad8d3"}},{"code_sha256_prefix":"6bbe4beb6c3159f6","entry":"TFPNet","repo":"candlelabai/tpfnet","repo_kind":"official","path":"model.py","file_url":"https://github.com/candlelabai/tpfnet/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6bbe4beb6c3159f6"}},{"code_sha256_prefix":"0bd1daf04f4471cc","entry":"backbone","repo":"candlelabai/tpfnet","repo_kind":"official","path":"model.py","file_url":"https://github.com/candlelabai/tpfnet/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0bd1daf04f4471cc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}