{"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/class-re-activation-maps-for-weakly","title":"Class Re-Activation Maps for Weakly-Supervised Semantic Segmentation","arxiv_id":"2203.00962","date":"2022-03-02","proceeding":"CVPR 2022 1","authors":["Zhaozheng Chen","Tan Wang","Xiongwei Wu","Xian-Sheng Hua","Hanwang Zhang","Qianru Sun"],"abstract":"Extracting class activation maps (CAM) is arguably the most standard step of generating pseudo masks for weakly-supervised semantic segmentation (WSSS). Yet, we find that the crux of the unsatisfactory pseudo masks is the binary cross-entropy loss (BCE) widely used in CAM. Specifically, due to the sum-over-class pooling nature of BCE, each pixel in CAM may be responsive to multiple classes co-occurring in the same receptive field. As a result, given a class, its hot CAM pixels may wrongly invade the area belonging to other classes, or the non-hot ones may be actually a part of the class. To this end, we introduce an embarrassingly simple yet surprisingly effective method: Reactivating the converged CAM with BCE by using softmax cross-entropy loss (SCE), dubbed \\textbf{ReCAM}. Given an image, we use CAM to extract the feature pixels of each single class, and use them with the class label to learn another fully-connected layer (after the backbone) with SCE. Once converged, we extract ReCAM in the same way as in CAM. Thanks to the contrastive nature of SCE, the pixel response is disentangled into different classes and hence less mask ambiguity is expected. The evaluation on both PASCAL VOC and MS~COCO shows that ReCAM not only generates high-quality masks, but also supports plug-and-play in any CAM variant with little overhead.","url_abs":"https://arxiv.org/abs/2203.00962v1","url_pdf":"https://arxiv.org/pdf/2203.00962v1.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":"class-re-activation-maps-for-weakly","repo_url":"https://github.com/zhaozhengchen/recam","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"weakly-supervised-semantic-segmentation-1","task_name":"Weakly supervised Semantic Segmentation"},{"task_slug":"weakly-supervised-semantic-segmentation","task_name":"Weakly-Supervised Semantic Segmentation"}],"methods":[{"method_slug":"cam","method_name":"CAM"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.00962","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.00962"}},"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/zhaozhengchen/recam","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/zhaozhengChen/ReCAM","reach":{"status":"ok"}}],"summary":{"ran_violates":2,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":5,"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":5,"samples":[{"code_sha256_prefix":"c343c863b4fa995a","entry":"get_strided_size","repo":"zhaozhengChen/ReCAM","repo_kind":"official","path":"step/make_recam.py","file_url":"https://github.com/zhaozhengChen/ReCAM/blob/HEAD/step/make_recam.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c343c863b4fa995a"}},{"code_sha256_prefix":"5b2a56217aad9e85","entry":"get_strided_up_size","repo":"zhaozhengChen/ReCAM","repo_kind":"official","path":"step/make_recam.py","file_url":"https://github.com/zhaozhengChen/ReCAM/blob/HEAD/step/make_recam.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b2a56217aad9e85"}},{"code_sha256_prefix":"b86a17571429fc45","entry":"split_dataset","repo":"zhaozhengChen/ReCAM","repo_kind":"official","path":"step/make_recam.py","file_url":"https://github.com/zhaozhengChen/ReCAM/blob/HEAD/step/make_recam.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b86a17571429fc45"}},{"code_sha256_prefix":"37a344eb53d94767","entry":"_work","repo":"zhaozhengChen/ReCAM","repo_kind":"official","path":"step/make_recam.py","file_url":"https://github.com/zhaozhengChen/ReCAM/blob/HEAD/step/make_recam.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":"37a344eb53d94767"}},{"code_sha256_prefix":"22664fc78da9eeda","entry":"run","repo":"zhaozhengChen/ReCAM","repo_kind":"official","path":"step/make_recam.py","file_url":"https://github.com/zhaozhengChen/ReCAM/blob/HEAD/step/make_recam.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":"22664fc78da9eeda"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}