{"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/size-invariance-matters-rethinking-metrics","title":"Size-invariance Matters: Rethinking Metrics and Losses for Imbalanced Multi-object Salient Object Detection","arxiv_id":"2405.09782","date":"2024-05-16","proceeding":null,"authors":["Feiran Li","Qianqian Xu","Shilong Bao","Zhiyong Yang","Runmin Cong","Xiaochun Cao","Qingming Huang"],"abstract":"This paper explores the size-invariance of evaluation metrics in Salient Object Detection (SOD), especially when multiple targets of diverse sizes co-exist in the same image. We observe that current metrics are size-sensitive, where larger objects are focused, and smaller ones tend to be ignored. We argue that the evaluation should be size-invariant because bias based on size is unjustified without additional semantic information. In pursuit of this, we propose a generic approach that evaluates each salient object separately and then combines the results, effectively alleviating the imbalance. We further develop an optimization framework tailored to this goal, achieving considerable improvements in detecting objects of different sizes. Theoretically, we provide evidence supporting the validity of our new metrics and present the generalization analysis of SOD. Extensive experiments demonstrate the effectiveness of our method. The code is available at https://github.com/Ferry-Li/SI-SOD.","url_abs":"https://arxiv.org/abs/2405.09782v2","url_pdf":"https://arxiv.org/pdf/2405.09782v2.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":"size-invariance-matters-rethinking-metrics","repo_url":"https://github.com/ferry-li/si-sod","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"object","task_name":"Object"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"salient-object-detection-1","task_name":"Salient Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.09782","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.09782"}},"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/ferry-li/si-sod","reach":{"status":"ok"}}],"summary":{"ran":14,"unverified":1},"by_repo_kind":{"official":{"samples":15,"ran":14,"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":15,"samples":[{"code_sha256_prefix":"f664996300027356","entry":"BCELoss","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/loss/original_loss.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/loss/original_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f664996300027356"}},{"code_sha256_prefix":"7563a493ba77e17d","entry":"KthBit","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/criterions/metrics.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/criterions/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7563a493ba77e17d"}},{"code_sha256_prefix":"f65ef5d34d5c1601","entry":"MAELoss","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/loss/original_loss.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/loss/original_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f65ef5d34d5c1601"}},{"code_sha256_prefix":"4c56493a9d63022a","entry":"MSELoss","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/loss/original_loss.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/loss/original_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4c56493a9d63022a"}},{"code_sha256_prefix":"c339b6b7b22e541d","entry":"binarize","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/datasets/utils.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/datasets/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c339b6b7b22e541d"}},{"code_sha256_prefix":"82f310b528b45b8b","entry":"binary","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/datasets/generate_weight.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/datasets/generate_weight.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"82f310b528b45b8b"}},{"code_sha256_prefix":"9b5a678f5829b353","entry":"compute_weight","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/datasets/generate_weight.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/datasets/generate_weight.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9b5a678f5829b353"}},{"code_sha256_prefix":"622b01679f26c546","entry":"create_colormap","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/datasets/utils.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/datasets/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"622b01679f26c546"}},{"code_sha256_prefix":"90f3c7829b370a44","entry":"find_connection","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/datasets/generate_weight.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/datasets/generate_weight.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"90f3c7829b370a44"}},{"code_sha256_prefix":"e5bc37f50fba1ec9","entry":"find_num_bin","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/criterions/metrics.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/criterions/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e5bc37f50fba1ec9"}},{"code_sha256_prefix":"b2c0d807b159bd5b","entry":"get_dataloader","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/datasets/base_data.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/datasets/base_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b2c0d807b159bd5b"}},{"code_sha256_prefix":"870194b136c02194","entry":"get_optimizer","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/optimizer/optimizer.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/optimizer/optimizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"870194b136c02194"}},{"code_sha256_prefix":"cbb9d7563e2ebd55","entry":"get_time","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/utils/logger.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/utils/logger.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cbb9d7563e2ebd55"}},{"code_sha256_prefix":"c81a16454136cfcb","entry":"mask_split_bit","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/criterions/metrics.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/criterions/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c81a16454136cfcb"}},{"code_sha256_prefix":"3650c7025df9740e","entry":"apply_colormap","repo":"ferry-li/si-sod","repo_kind":"official","path":"src/datasets/utils.py","file_url":"https://github.com/ferry-li/si-sod/blob/HEAD/src/datasets/utils.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":"3650c7025df9740e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}