{"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/detail-preserving-transformer-for-light-field","title":"Detail-Preserving Transformer for Light Field Image Super-Resolution","arxiv_id":"2201.00346","date":"2022-01-02","proceeding":null,"authors":["Shunzhou Wang","Tianfei Zhou","Yao Lu","Huijun Di"],"abstract":"Recently, numerous algorithms have been developed to tackle the problem of light field super-resolution (LFSR), i.e., super-resolving low-resolution light fields to gain high-resolution views. Despite delivering encouraging results, these approaches are all convolution-based, and are naturally weak in global relation modeling of sub-aperture images necessarily to characterize the inherent structure of light fields. In this paper, we put forth a novel formulation built upon Transformers, by treating LFSR as a sequence-to-sequence reconstruction task. In particular, our model regards sub-aperture images of each vertical or horizontal angular view as a sequence, and establishes long-range geometric dependencies within each sequence via a spatial-angular locally-enhanced self-attention layer, which maintains the locality of each sub-aperture image as well. Additionally, to better recover image details, we propose a detail-preserving Transformer (termed as DPT), by leveraging gradient maps of light field to guide the sequence learning. DPT consists of two branches, with each associated with a Transformer for learning from an original or gradient image sequence. The two branches are finally fused to obtain comprehensive feature representations for reconstruction. Evaluations are conducted on a number of light field datasets, including real-world scenes and synthetic data. The proposed method achieves superior performance comparing with other state-of-the-art schemes. Our code is publicly available at: https://github.com/BITszwang/DPT.","url_abs":"https://arxiv.org/abs/2201.00346v1","url_pdf":"https://arxiv.org/pdf/2201.00346v1.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":"detail-preserving-transformer-for-light-field","repo_url":"https://github.com/bitszwang/dpt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-super-resolution","task_name":"Image Super-Resolution"},{"task_slug":"super-resolution","task_name":"Super-Resolution"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-prediction-transformer","method_name":"DPT"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2201.00346","atlas_url":"https://app.syntology.ai/?focus=2201.00346","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.00346"}},"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/BITszwang/DPT","reach":null}],"summary":{"ran":6,"ran_fixture":3,"ran_draft_wrong":1,"unverified":11},"by_repo_kind":{"official":{"samples":21,"ran":10,"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":21,"samples":[{"code_sha256_prefix":"80638a7f71f65994","entry":"CascadedBlocks","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"80638a7f71f65994"}},{"code_sha256_prefix":"9f9a1f9c3c707e01","entry":"ChannelSplit","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9f9a1f9c3c707e01"}},{"code_sha256_prefix":"f4e90c515b04abbf","entry":"Col_T","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f4e90c515b04abbf"}},{"code_sha256_prefix":"ff1912d825ac63f3","entry":"FeaExtract","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ff1912d825ac63f3"}},{"code_sha256_prefix":"80d588a370444f1e","entry":"FormOutput_ADAM","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"80d588a370444f1e"}},{"code_sha256_prefix":"bf400d25a0e34dcd","entry":"Get_gradient","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"bf400d25a0e34dcd"}},{"code_sha256_prefix":"ddb70c97b2b38074","entry":"IMDB","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"ddb70c97b2b38074"}},{"code_sha256_prefix":"413981a02c3592b1","entry":"LFsplit","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"413981a02c3592b1"}},{"code_sha256_prefix":"77b0e635fd4b25e1","entry":"RB","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"77b0e635fd4b25e1"}},{"code_sha256_prefix":"8340beb7f2bb1c80","entry":"ResASPP","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8340beb7f2bb1c80"}},{"code_sha256_prefix":"5829d6770cdaf76f","entry":"ADAM","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"5829d6770cdaf76f"}},{"code_sha256_prefix":"09342d27b20ecc06","entry":"ContentBranch","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"09342d27b20ecc06"}},{"code_sha256_prefix":"af8b2480c281f636","entry":"CrossAttentionSALSA","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"af8b2480c281f636"}},{"code_sha256_prefix":"e509d7c267edf9a6","entry":"FormOutput","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"e509d7c267edf9a6"}},{"code_sha256_prefix":"f7ee82d22b48e48b","entry":"FusionTransformer","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"f7ee82d22b48e48b"}},{"code_sha256_prefix":"251d36b0ae9264f6","entry":"GradientBranch","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"251d36b0ae9264f6"}},{"code_sha256_prefix":"16c40716bbfc6979","entry":"Net","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"16c40716bbfc6979"}},{"code_sha256_prefix":"9aab0ff9908d6a9f","entry":"SALSA","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"9aab0ff9908d6a9f"}},{"code_sha256_prefix":"f18e2d1266b5e1cd","entry":"Upsample","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"f18e2d1266b5e1cd"}},{"code_sha256_prefix":"7347897a9e7dd52d","entry":"crossattentionsalsa","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"7347897a9e7dd52d"}},{"code_sha256_prefix":"8ba433c8ca413b6e","entry":"salsa","repo":"BITszwang/DPT","repo_kind":"official","path":"code/model_DPT.py","file_url":"https://github.com/BITszwang/DPT/blob/HEAD/code/model_DPT.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":"8ba433c8ca413b6e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}