{"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/ccnet-criss-cross-attention-for-semantic","title":"CCNet: Criss-Cross Attention for Semantic Segmentation","arxiv_id":"1811.11721","date":"2018-11-28","proceeding":"ICCV 2019 10","authors":["Zilong Huang","Xinggang Wang","Yunchao Wei","Lichao Huang","Humphrey Shi","Wenyu Liu","Thomas S. Huang"],"abstract":"Contextual information is vital in visual understanding problems, such as semantic segmentation and object detection. We propose a Criss-Cross Network (CCNet) for obtaining full-image contextual information in a very effective and efficient way. Concretely, for each pixel, a novel criss-cross attention module harvests the contextual information of all the pixels on its criss-cross path. By taking a further recurrent operation, each pixel can finally capture the full-image dependencies. Besides, a category consistent loss is proposed to enforce the criss-cross attention module to produce more discriminative features. Overall, CCNet is with the following merits: 1) GPU memory friendly. Compared with the non-local block, the proposed recurrent criss-cross attention module requires 11x less GPU memory usage. 2) High computational efficiency. The recurrent criss-cross attention significantly reduces FLOPs by about 85% of the non-local block. 3) The state-of-the-art performance. We conduct extensive experiments on semantic segmentation benchmarks including Cityscapes, ADE20K, human parsing benchmark LIP, instance segmentation benchmark COCO, video segmentation benchmark CamVid. In particular, our CCNet achieves the mIoU scores of 81.9%, 45.76% and 55.47% on the Cityscapes test set, the ADE20K validation set and the LIP validation set respectively, which are the new state-of-the-art results. The source codes are available at \\url{https://github.com/speedinghzl/CCNet}.","url_abs":"https://arxiv.org/abs/1811.11721v2","url_pdf":"https://arxiv.org/pdf/1811.11721v2.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":"ccnet-criss-cross-attention-for-semantic","repo_url":"https://github.com/speedinghzl/CCNet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"ccnet-criss-cross-attention-for-semantic","repo_url":"https://github.com/justld/CCNet_paddle","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"paddle","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"ccnet-criss-cross-attention-for-semantic","repo_url":"https://github.com/mindspore-courses/External-Attention-MindSpore/blob/main/model/attention/CrissCrossAttention.py","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"ccnet-criss-cross-attention-for-semantic","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":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"human-parsing","task_name":"Human Parsing"},{"task_slug":"instance-segmentation","task_name":"Instance Segmentation"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"thermal-image-segmentation","task_name":"Thermal Image Segmentation"},{"task_slug":"video-segmentation","task_name":"Video Segmentation"},{"task_slug":"video-semantic-segmentation","task_name":"Video Semantic Segmentation"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"ccnet","method_name":"CCNet"},{"method_slug":"non-local-block","method_name":"Non-Local Block"},{"method_slug":"non-local-operation","method_name":"Non-Local Operation"},{"method_slug":"residual-connection","method_name":"Residual Connection"}],"datasets_introduced":[],"methods_introduced":[{"slug":"ccnet","name":"CCNet","full_name":"Criss-Cross Network"}],"results":[{"leaderboard":"/sota/semantic-segmentation-on-cityscapes","task":"Semantic Segmentation","dataset":"Cityscapes test","model":"CCNet","rank_in_archive_order":41,"of":105,"metrics":{"Mean IoU (class)":"81.4%"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-foodseg103","task":"Semantic Segmentation","dataset":"FoodSeg103","model":"CCNet (ResNet-50)","rank_in_archive_order":7,"of":7,"metrics":{"mIoU":"35.5"},"uses_additional_data":true},{"leaderboard":"/sota/thermal-image-segmentation-on-mfn-dataset","task":"Thermal Image Segmentation","dataset":"MFN Dataset","model":"CCNet","rank_in_archive_order":51,"of":55,"metrics":{"mIOU":"43.3"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1811.11721","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1811.11721"}},"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/mindspore-courses/External-Attention-MindSpore/blob/main/model/attention/CrissCrossAttention.py","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/justld/CCNet_paddle","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/speedinghzl/CCNet","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-mmlab/mmsegmentation","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":4,"ran_draft_wrong":2,"ran_honours":2,"ran_violates":1,"unverified":5},"by_repo_kind":{"official":{"samples":9,"ran":8,"repositories":1},"listed":{"samples":5,"ran":1,"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":"349015c9fdf7266b","entry":"INF","repo":"speedinghzl/CCNet","repo_kind":"official","path":"cc_attention/functions.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/cc_attention/functions.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"349015c9fdf7266b"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"speedinghzl/CCNet","repo_kind":"official","path":"networks/ccnet.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/networks/ccnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"26664d79586aad5a","entry":"get_palette","repo":"speedinghzl/CCNet","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/evaluate.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"26664d79586aad5a"}},{"code_sha256_prefix":"d94639b28b2134ff","entry":"iou","repo":"speedinghzl/CCNet","repo_kind":"official","path":"loss/lovasz_losses.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/loss/lovasz_losses.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d94639b28b2134ff"}},{"code_sha256_prefix":"1211530cd527bd0b","entry":"iou_binary","repo":"speedinghzl/CCNet","repo_kind":"official","path":"loss/lovasz_losses.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/loss/lovasz_losses.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1211530cd527bd0b"}},{"code_sha256_prefix":"e85b5d21dc5b8382","entry":"lovasz_grad","repo":"speedinghzl/CCNet","repo_kind":"official","path":"loss/lovasz_losses.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/loss/lovasz_losses.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e85b5d21dc5b8382"}},{"code_sha256_prefix":"27504cbeb5811ea6","entry":"outS","repo":"speedinghzl/CCNet","repo_kind":"official","path":"networks/ccnet.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/networks/ccnet.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"27504cbeb5811ea6"}},{"code_sha256_prefix":"6ec02fe7ffee8530","entry":"pad_image","repo":"speedinghzl/CCNet","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/evaluate.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ec02fe7ffee8530"}},{"code_sha256_prefix":"2f75a098ce9f7b0e","entry":"partition_list","repo":"justld/CCNet_paddle","repo_kind":"listed","path":"paddleseg/core/predict.py","file_url":"https://github.com/justld/CCNet_paddle/blob/HEAD/paddleseg/core/predict.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2f75a098ce9f7b0e"}},{"code_sha256_prefix":"95bccf5957a196e4","entry":"flip_combination","repo":"justld/CCNet_paddle","repo_kind":"listed","path":"paddleseg/core/infer.py","file_url":"https://github.com/justld/CCNet_paddle/blob/HEAD/paddleseg/core/infer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"95bccf5957a196e4"}},{"code_sha256_prefix":"a5dbdd4f2d59692e","entry":"get_reverse_list","repo":"justld/CCNet_paddle","repo_kind":"listed","path":"paddleseg/core/infer.py","file_url":"https://github.com/justld/CCNet_paddle/blob/HEAD/paddleseg/core/infer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a5dbdd4f2d59692e"}},{"code_sha256_prefix":"0b3ec74bd2e5ed5d","entry":"get_test_config","repo":"justld/CCNet_paddle","repo_kind":"listed","path":"predict.py","file_url":"https://github.com/justld/CCNet_paddle/blob/HEAD/predict.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0b3ec74bd2e5ed5d"}},{"code_sha256_prefix":"0c97512ed5e1d7e1","entry":"get_test_config","repo":"justld/CCNet_paddle","repo_kind":"listed","path":"val.py","file_url":"https://github.com/justld/CCNet_paddle/blob/HEAD/val.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0c97512ed5e1d7e1"}},{"code_sha256_prefix":"e3543651d7594983","entry":"predict_sliding","repo":"speedinghzl/CCNet","repo_kind":"official","path":"evaluate.py","file_url":"https://github.com/speedinghzl/CCNet/blob/HEAD/evaluate.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":"e3543651d7594983"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}