{"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/reviving-cultural-heritage-a-novel-approach","title":"Reviving Cultural Heritage: A Novel Approach for Comprehensive Historical Document Restoration","arxiv_id":"2507.05108","date":"2025-07-07","proceeding":null,"authors":["Yuyi Zhang","Peirong Zhang","Zhenhua Yang","Pengyu Yan","Yongxin Shi","Pengwei Liu","Fengjun Guo","Lianwen Jin"],"abstract":"Historical documents represent an invaluable cultural heritage, yet have undergone significant degradation over time through tears, water erosion, and oxidation. Existing Historical Document Restoration (HDR) methods primarily focus on single modality or limited-size restoration, failing to meet practical needs. To fill this gap, we present a full-page HDR dataset (FPHDR) and a novel automated HDR solution (AutoHDR). Specifically, FPHDR comprises 1,633 real and 6,543 synthetic images with character-level and line-level locations, as well as character annotations in different damage grades. AutoHDR mimics historians' restoration workflows through a three-stage approach: OCR-assisted damage localization, vision-language context text prediction, and patch autoregressive appearance restoration. The modular architecture of AutoHDR enables seamless human-machine collaboration, allowing for flexible intervention and optimization at each restoration stage. Experiments demonstrate AutoHDR's remarkable performance in HDR. When processing severely damaged documents, our method improves OCR accuracy from 46.83\\% to 84.05\\%, with further enhancement to 94.25\\% through human-machine collaboration. We believe this work represents a significant advancement in automated historical document restoration and contributes substantially to cultural heritage preservation. The model and dataset are available at https://github.com/SCUT-DLVCLab/AutoHDR.","url_abs":"https://arxiv.org/abs/2507.05108v1","url_pdf":"https://arxiv.org/pdf/2507.05108v1.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":"reviving-cultural-heritage-a-novel-approach","repo_url":"https://github.com/yeungchenwa/hdr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"optical-character-recognition","task_name":"Optical Character Recognition (OCR)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2507.05108","atlas_url":"https://app.syntology.ai/?focus=2507.05108","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2507.05108"}},"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/SCUT-DLVCLab/AutoHDR","reach":{"status":"ok"}}],"summary":{"ran_honours":1,"ran_fixture":2,"unverified":14},"by_repo_kind":{"found_in_text":{"samples":17,"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":17,"samples":[{"code_sha256_prefix":"988a3c854b1b13d0","entry":"autopad","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/common.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/common.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"988a3c854b1b13d0"}},{"code_sha256_prefix":"82a15cc1e46f7e4d","entry":"to_3d","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/attention.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/attention.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"82a15cc1e46f7e4d"}},{"code_sha256_prefix":"b20f2a5df739a59e","entry":"to_4d","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/attention.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/attention.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b20f2a5df739a59e"}},{"code_sha256_prefix":"b9a38c519e71eeba","entry":"DWConv","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/common.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/common.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":"b9a38c519e71eeba"}},{"code_sha256_prefix":"ff59d2987b57e4ba","entry":"build","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/upocr.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/upocr.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":"ff59d2987b57e4ba"}},{"code_sha256_prefix":"29d07130d382c4a8","entry":"build_MeMA","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/attention.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/attention.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":"29d07130d382c4a8"}},{"code_sha256_prefix":"a8a233a4fe10a771","entry":"build_lateral_connection","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/block.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/block.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":"a8a233a4fe10a771"}},{"code_sha256_prefix":"134eca93633f69a9","entry":"build_task_prompt","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/task_prompt.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/task_prompt.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":"134eca93633f69a9"}},{"code_sha256_prefix":"a940fd9f6cc7ee71","entry":"build_task_weight","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/task_prompt.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/task_prompt.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":"a940fd9f6cc7ee71"}},{"code_sha256_prefix":"97fd5b07bccce139","entry":"build_vgg16","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/vgg16.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/vgg16.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":"97fd5b07bccce139"}},{"code_sha256_prefix":"4fcaa1927ce5f419","entry":"get_activation","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/block.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/block.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":"4fcaa1927ce5f419"}},{"code_sha256_prefix":"74c8cc26816ad3b3","entry":"is_char_in_font","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"utils_pipeline.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/utils_pipeline.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":"74c8cc26816ad3b3"}},{"code_sha256_prefix":"2ed969a6abb31f68","entry":"load_pretrained_model","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/upocr.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/upocr.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":"2ed969a6abb31f68"}},{"code_sha256_prefix":"960ccde0f99b275a","entry":"render_char_with_font_L","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"utils_pipeline.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/utils_pipeline.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":"960ccde0f99b275a"}},{"code_sha256_prefix":"386a04c4b6c96c88","entry":"smooth_BCE","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"utils/loss.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/utils/loss.py","link_basis":"harvester_set","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":"386a04c4b6c96c88"}},{"code_sha256_prefix":"079d0a85a0bfbb47","entry":"transI_fusebn","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"models/common.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/models/common.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":"079d0a85a0bfbb47"}},{"code_sha256_prefix":"ba96214e92bc8bea","entry":"xyxy2xywh","repo":"SCUT-DLVCLab/AutoHDR","repo_kind":"found_in_text","path":"utils_pipeline.py","file_url":"https://github.com/SCUT-DLVCLab/AutoHDR/blob/HEAD/utils_pipeline.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":"ba96214e92bc8bea"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}