{"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/dual-attention-network-for-scene-segmentation","title":"Dual Attention Network for Scene Segmentation","arxiv_id":"1809.02983","date":"2018-09-09","proceeding":"CVPR 2019 6","authors":["Jun Fu","Jing Liu","Haijie Tian","Yong Li","Yongjun Bao","Zhiwei Fang","Hanqing Lu"],"abstract":"In this paper, we address the scene segmentation task by capturing rich\ncontextual dependencies based on the selfattention mechanism. Unlike previous\nworks that capture contexts by multi-scale features fusion, we propose a Dual\nAttention Networks (DANet) to adaptively integrate local features with their\nglobal dependencies. Specifically, we append two types of attention modules on\ntop of traditional dilated FCN, which model the semantic interdependencies in\nspatial and channel dimensions respectively. The position attention module\nselectively aggregates the features at each position by a weighted sum of the\nfeatures at all positions. Similar features would be related to each other\nregardless of their distances. Meanwhile, the channel attention module\nselectively emphasizes interdependent channel maps by integrating associated\nfeatures among all channel maps. We sum the outputs of the two attention\nmodules to further improve feature representation which contributes to more\nprecise segmentation results. We achieve new state-of-the-art segmentation\nperformance on three challenging scene segmentation datasets, i.e., Cityscapes,\nPASCAL Context and COCO Stuff dataset. In particular, a Mean IoU score of 81.5%\non Cityscapes test set is achieved without using coarse data. We make the code\nand trained model publicly available at https://github.com/junfu1115/DANet","url_abs":"http://arxiv.org/abs/1809.02983v4","url_pdf":"http://arxiv.org/pdf/1809.02983v4.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":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/junfu1115/DANet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/JanMarcelKezmann/TensorFlow-Advanced-Segmentation-Models","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/hbzhang/AwesomeSelfDriving","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/niecongchong/danet-keras","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/osmr/imgclsmob","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mxnet","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/xmu-xiaoma666/External-Attention-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/yiskw713/DualAttention_for_Segmentation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/yougoforward/hlzhu_DANet_git","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/zhenxingsh/Pytorch_DANet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/PaddlePaddle/PaddleSeg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":null},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/mindspore-courses/External-Attention-MindSpore/blob/main/model/attention/DANet.py","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"dual-attention-network-for-scene-segmentation","repo_url":"https://github.com/open-mmlab/mmsegmentation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":null,"task_name":"Position"},{"task_slug":"scene-segmentation","task_name":"Scene Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"thermal-image-segmentation","task_name":"Thermal Image Segmentation"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"danet","method_name":"DANet"},{"method_slug":"fcn","method_name":"FCN"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[{"slug":"danet","name":"DANet","full_name":"Dual Attention Network"}],"results":[{"leaderboard":"/sota/semantic-segmentation-on-bdd100k-val","task":"Semantic Segmentation","dataset":"BDD100K val","model":"DANet","rank_in_archive_order":5,"of":24,"metrics":{"mIoU":"62.8"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-coco-stuff-test","task":"Semantic Segmentation","dataset":"COCO-Stuff test","model":"DANet (ResNet-101)","rank_in_archive_order":14,"of":21,"metrics":{"mIoU":"39.7%"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-cityscapes","task":"Semantic Segmentation","dataset":"Cityscapes test","model":"DANet (ResNet-101)","rank_in_archive_order":40,"of":105,"metrics":{"Mean IoU (class)":"81.5%"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-dada-seg","task":"Semantic Segmentation","dataset":"DADA-seg","model":"DANet","rank_in_archive_order":17,"of":28,"metrics":{"mIoU":"22.24"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-densepass","task":"Semantic Segmentation","dataset":"DensePASS","model":"DANet (ResNet-101)","rank_in_archive_order":30,"of":36,"metrics":{"mIoU":"28.5%"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-pascal-context","task":"Semantic Segmentation","dataset":"PASCAL Context","model":"DANet (ResNet-101)","rank_in_archive_order":47,"of":66,"metrics":{"mIoU":"52.6"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-pascal-voc-2012","task":"Semantic Segmentation","dataset":"PASCAL VOC 2012 test","model":"DANet (ResNet-101)","rank_in_archive_order":25,"of":51,"metrics":{"Mean IoU":"82.6%"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-trans10k","task":"Semantic Segmentation","dataset":"Trans10K","model":"DANet","rank_in_archive_order":6,"of":15,"metrics":{"GFLOPs":"198.00","mIoU":"68.81%"},"uses_additional_data":false},{"leaderboard":"/sota/thermal-image-segmentation-on-mfn-dataset","task":"Thermal Image Segmentation","dataset":"MFN Dataset","model":"DANet","rank_in_archive_order":53,"of":55,"metrics":{"mIOU":"41.3"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1809.02983","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1809.02983"}},"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/PaddlePaddle/PaddleSeg","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhenxingsh/Pytorch_DANet","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/junfu1115/DANet","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hbzhang/AwesomeSelfDriving","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/niecongchong/danet-keras","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mindspore-courses/External-Attention-MindSpore/blob/main/model/attention/DANet.py","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/osmr/imgclsmob","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yougoforward/hlzhu_DANet_git","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-mmlab/mmsegmentation","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xmu-xiaoma666/External-Attention-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JanMarcelKezmann/TensorFlow-Advanced-Segmentation-Models","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yiskw713/DualAttention_for_Segmentation","reach":{"status":"ok"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"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":5,"samples":[{"code_sha256_prefix":"ccb24f9418500942","entry":"get_city_pairs","repo":"junfu1115/DANet","repo_kind":"official","path":"encoding/datasets/cityscapes_v0.py","file_url":"https://github.com/junfu1115/DANet/blob/HEAD/encoding/datasets/cityscapes_v0.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"ccb24f9418500942"}},{"code_sha256_prefix":"ba3e7aabcdfce646","entry":"get_city_pairs","repo":"junfu1115/DANet","repo_kind":"official","path":"encoding/datasets/cityscapes.py","file_url":"https://github.com/junfu1115/DANet/blob/HEAD/encoding/datasets/cityscapes.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":false,"mcp_get_code":{"code_sha256":"ba3e7aabcdfce646"}},{"code_sha256_prefix":"d8fa6abe733ae073","entry":"get_deepten","repo":"junfu1115/DANet","repo_kind":"official","path":"encoding/models/deepten.py","file_url":"https://github.com/junfu1115/DANet/blob/HEAD/encoding/models/deepten.py","link_basis":"plan_row","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":"d8fa6abe733ae073"}},{"code_sha256_prefix":"a67af4c02a68b8dd","entry":"get_deepten_resnet50_minc","repo":"junfu1115/DANet","repo_kind":"official","path":"encoding/models/deepten.py","file_url":"https://github.com/junfu1115/DANet/blob/HEAD/encoding/models/deepten.py","link_basis":"plan_row","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":"a67af4c02a68b8dd"}},{"code_sha256_prefix":"eb69f67b45ca28a7","entry":"rename_weight_for_head","repo":"junfu1115/DANet","repo_kind":"official","path":"experiments/segmentation/model_mapping.py","file_url":"https://github.com/junfu1115/DANet/blob/HEAD/experiments/segmentation/model_mapping.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":false,"mcp_get_code":{"code_sha256":"eb69f67b45ca28a7"}},{"code_sha256_prefix":"e8e7fc06d9a54bbc","entry":"short_hash","repo":"junfu1115/DANet","repo_kind":"official","path":"encoding/models/model_store.py","file_url":"https://github.com/junfu1115/DANet/blob/HEAD/encoding/models/model_store.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":false,"mcp_get_code":{"code_sha256":"e8e7fc06d9a54bbc"}},{"code_sha256_prefix":"f8b881dae14f02c3","entry":"test_batchify_fn","repo":"junfu1115/DANet","repo_kind":"official","path":"encoding/datasets/base.py","file_url":"https://github.com/junfu1115/DANet/blob/HEAD/encoding/datasets/base.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"f8b881dae14f02c3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}