{"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/constrained-cnn-losses-for-weakly-supervised","title":"Constrained-CNN losses for weakly supervised segmentation","arxiv_id":"1805.04628","date":"2018-05-12","proceeding":null,"authors":["Hoel Kervadec","Jose Dolz","Meng Tang","Eric Granger","Yuri Boykov","Ismail Ben Ayed"],"abstract":"Weakly-supervised learning based on, e.g., partially labelled images or\nimage-tags, is currently attracting significant attention in CNN segmentation\nas it can mitigate the need for full and laborious pixel/voxel annotations.\nEnforcing high-order (global) inequality constraints on the network output (for\ninstance, to constrain the size of the target region) can leverage unlabeled\ndata, guiding the training process with domain-specific knowledge. Inequality\nconstraints are very flexible because they do not assume exact prior knowledge.\nHowever, constrained Lagrangian dual optimization has been largely avoided in\ndeep networks, mainly for computational tractability reasons. To the best of\nour knowledge, the method of [Pathak et al., 2015] is the only prior work that\naddresses deep CNNs with linear constraints in weakly supervised segmentation.\nIt uses the constraints to synthesize fully-labeled training masks (proposals)\nfrom weak labels, mimicking full supervision and facilitating dual\noptimization. We propose to introduce a differentiable penalty, which enforces\ninequality constraints directly in the loss function, avoiding expensive\nLagrangian dual iterates and proposal generation. From constrained-optimization\nperspective, our simple penalty-based approach is not optimal as there is no\nguarantee that the constraints are satisfied. However, surprisingly, it yields\nsubstantially better results than the Lagrangian-based constrained CNNs in\n[Pathak et al., 2015], while reducing the computational demand for training. By\nannotating only a small fraction of the pixels, the proposed approach can reach\na level of segmentation performance that is comparable to full supervision on\nthree separate tasks. While our experiments focused on basic linear constraints\nsuch as the target-region size and image tags, our framework can be easily\nextended to other non-linear constraints.","url_abs":"http://arxiv.org/abs/1805.04628v2","url_pdf":"http://arxiv.org/pdf/1805.04628v2.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":"constrained-cnn-losses-for-weakly-supervised","repo_url":"https://github.com/LIVIAETS/SizeLoss_WSS","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"constrained-cnn-losses-for-weakly-supervised","repo_url":"https://github.com/Ahmadreza-Jeddi/rloss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"constrained-cnn-losses-for-weakly-supervised","repo_url":"https://github.com/PengyiZhang/MIADeepSSL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"constrained-cnn-losses-for-weakly-supervised","repo_url":"https://github.com/meng-tang/rloss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"medical-image-segmentation","task_name":"Medical Image Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"weakly-supervised-segmentation","task_name":"Weakly supervised segmentation"},{"task_slug":"weakly-supervised-semantic-segmentation","task_name":"Weakly-Supervised Semantic Segmentation"},{"task_slug":"weakly-supervised-learning","task_name":"Weakly-supervised Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1805.04628","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1805.04628"}},"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/meng-tang/rloss","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Ahmadreza-Jeddi/rloss","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/PengyiZhang/MIADeepSSL","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/LIVIAETS/SizeLoss_WSS","reach":{"status":"ok"}}],"summary":{"unverified":1},"by_repo_kind":{"listed":{"samples":1,"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":0,"samples":[{"code_sha256_prefix":"4e2f3a8f76e019e9","entry":"conv3x3_relu","repo":"Ahmadreza-Jeddi/rloss","repo_kind":"listed","path":"pytorch/pytorch-deeplab_v3_plus/modeling/deeplab_v2_VGG.py","file_url":"https://github.com/Ahmadreza-Jeddi/rloss/blob/HEAD/pytorch/pytorch-deeplab_v3_plus/modeling/deeplab_v2_VGG.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":true,"mcp_get_code":{"code_sha256":"4e2f3a8f76e019e9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}