{"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/fapn-feature-aligned-pyramid-network-for","title":"FaPN: Feature-aligned Pyramid Network for Dense Image Prediction","arxiv_id":"2108.07058","date":"2021-08-16","proceeding":"ICCV 2021 10","authors":["Shihua Huang","Zhichao Lu","Ran Cheng","Cheng He"],"abstract":"Recent advancements in deep neural networks have made remarkable leap-forwards in dense image prediction. However, the issue of feature alignment remains as neglected by most existing approaches for simplicity. Direct pixel addition between upsampled and local features leads to feature maps with misaligned contexts that, in turn, translate to mis-classifications in prediction, especially on object boundaries. In this paper, we propose a feature alignment module that learns transformation offsets of pixels to contextually align upsampled higher-level features; and another feature selection module to emphasize the lower-level features with rich spatial details. We then integrate these two modules in a top-down pyramidal architecture and present the Feature-aligned Pyramid Network (FaPN). Extensive experimental evaluations on four dense prediction tasks and four datasets have demonstrated the efficacy of FaPN, yielding an overall improvement of 1.2 - 2.6 points in AP / mIoU over FPN when paired with Faster / Mask R-CNN. In particular, our FaPN achieves the state-of-the-art of 56.7% mIoU on ADE20K when integrated within Mask-Former. The code is available from https://github.com/EMI-Group/FaPN.","url_abs":"https://arxiv.org/abs/2108.07058v2","url_pdf":"https://arxiv.org/pdf/2108.07058v2.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":"fapn-feature-aligned-pyramid-network-for","repo_url":"https://github.com/EMI-Group/FaPN","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"fapn-feature-aligned-pyramid-network-for","repo_url":"https://github.com/ShihuaHuang95/FaPN-full","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"fapn-feature-aligned-pyramid-network-for","repo_url":"https://github.com/sithu31296/semantic-segmentation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"feature-selection","task_name":"feature selection"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"fpn","method_name":"FPN"},{"method_slug":"feature-selection","method_name":"Feature Selection"},{"method_slug":"mask-r-cnn","method_name":"Mask R-CNN"},{"method_slug":"rpn","method_name":"RPN"},{"method_slug":"roi-align","method_name":"RoIAlign"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/semantic-segmentation-on-ade20k","task":"Semantic Segmentation","dataset":"ADE20K","model":"FaPN (MaskFormer, Swin-L, ImageNet-22k pretrain)","rank_in_archive_order":38,"of":235,"metrics":{"Validation mIoU":"56.7"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-ade20k-val","task":"Semantic Segmentation","dataset":"ADE20K val","model":"FaPN (MaskFormer, Swin-L, ImageNet-22k pretrain)","rank_in_archive_order":24,"of":95,"metrics":{"mIoU":"56.7"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2108.07058","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.07058"}},"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/ShihuaHuang95/FaPN-full","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/EMI-Group/FaPN","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sithu31296/semantic-segmentation","reach":null}],"summary":{"ran":2,"unverified":2},"by_repo_kind":{"listed":{"samples":4,"ran":2,"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":"fa63073a461ed9bb","entry":"DCNv2","repo":"sithu31296/semantic-segmentation","repo_kind":"listed","path":"semseg/models/heads/fapn.py","file_url":"https://github.com/sithu31296/semantic-segmentation/blob/HEAD/semseg/models/heads/fapn.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":"fa63073a461ed9bb"}},{"code_sha256_prefix":"0fc5498c9607c95d","entry":"FSM","repo":"sithu31296/semantic-segmentation","repo_kind":"listed","path":"semseg/models/heads/fapn.py","file_url":"https://github.com/sithu31296/semantic-segmentation/blob/HEAD/semseg/models/heads/fapn.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":"0fc5498c9607c95d"}},{"code_sha256_prefix":"bf0a960709e48814","entry":"FAM","repo":"sithu31296/semantic-segmentation","repo_kind":"listed","path":"semseg/models/heads/fapn.py","file_url":"https://github.com/sithu31296/semantic-segmentation/blob/HEAD/semseg/models/heads/fapn.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":"bf0a960709e48814"}},{"code_sha256_prefix":"3f42be460dc63825","entry":"FaPNHead","repo":"sithu31296/semantic-segmentation","repo_kind":"listed","path":"semseg/models/heads/fapn.py","file_url":"https://github.com/sithu31296/semantic-segmentation/blob/HEAD/semseg/models/heads/fapn.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":"3f42be460dc63825"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}