{"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/relieving-long-tailed-instance-segmentation","title":"Relieving Long-tailed Instance Segmentation via Pairwise Class Balance","arxiv_id":"2201.02784","date":"2022-01-08","proceeding":"CVPR 2022 1","authors":["Yin-Yin He","Peizhen Zhang","Xiu-Shen Wei","Xiangyu Zhang","Jian Sun"],"abstract":"Long-tailed instance segmentation is a challenging task due to the extreme imbalance of training samples among classes. It causes severe biases of the head classes (with majority samples) against the tailed ones. This renders \"how to appropriately define and alleviate the bias\" one of the most important issues. Prior works mainly use label distribution or mean score information to indicate a coarse-grained bias. In this paper, we explore to excavate the confusion matrix, which carries the fine-grained misclassification details, to relieve the pairwise biases, generalizing the coarse one. To this end, we propose a novel Pairwise Class Balance (PCB) method, built upon a confusion matrix which is updated during training to accumulate the ongoing prediction preferences. PCB generates fightback soft labels for regularization during training. Besides, an iterative learning paradigm is developed to support a progressive and smooth regularization in such debiasing. PCB can be plugged and played to any existing method as a complement. Experimental results on LVIS demonstrate that our method achieves state-of-the-art performance without bells and whistles. Superior results across various architectures show the generalization ability. The code and trained models are available at https://github.com/megvii-research/PCB.","url_abs":"https://arxiv.org/abs/2201.02784v2","url_pdf":"https://arxiv.org/pdf/2201.02784v2.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":"relieving-long-tailed-instance-segmentation","repo_url":"https://github.com/megvii-research/pcb","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"relieving-long-tailed-instance-segmentation","repo_url":"https://github.com/2023-MindSpore-1/ms-code-105","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"instance-segmentation","task_name":"Instance Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[{"method_slug":"pcb","method_name":"PCB"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2201.02784","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.02784"}},"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/megvii-research/pcb","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-1/ms-code-105","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/megvii-research/PCB","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"unverified":11},"by_repo_kind":{"listed":{"samples":11,"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":"316fb42e9e6ed79e","entry":"a_cosine_learning_rate","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/lr_schedule.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/lr_schedule.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":"316fb42e9e6ed79e"}},{"code_sha256_prefix":"a0d4d553d4b95e53","entry":"accuracy","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/maskrcnn/accuracy.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/maskrcnn/accuracy.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":"a0d4d553d4b95e53"}},{"code_sha256_prefix":"58e8ebdfdf3e7c34","entry":"bbox2result_1image","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/util.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/util.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":"58e8ebdfdf3e7c34"}},{"code_sha256_prefix":"48b4b7f4e22caf1d","entry":"bbox_overlaps","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/dataset.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/dataset.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":"48b4b7f4e22caf1d"}},{"code_sha256_prefix":"0fd930bb273bb598","entry":"dynamic_lr","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/lr_schedule.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/lr_schedule.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":"0fd930bb273bb598"}},{"code_sha256_prefix":"b13acc0922dade5c","entry":"get_img_size","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"postprocess.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/postprocess.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":"b13acc0922dade5c"}},{"code_sha256_prefix":"99e18a5cd3724f31","entry":"get_resize_ratio","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"postprocess.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/postprocess.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":"99e18a5cd3724f31"}},{"code_sha256_prefix":"d6a99ec714147ac1","entry":"linear_warmup_learning_rate","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/lr_schedule.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/lr_schedule.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":"d6a99ec714147ac1"}},{"code_sha256_prefix":"81dd949ea3cb5b13","entry":"rescale_with_factor","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/dataset.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/dataset.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":"81dd949ea3cb5b13"}},{"code_sha256_prefix":"8178d0257544aab2","entry":"rescale_with_tuple","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/dataset.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/dataset.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":"8178d0257544aab2"}},{"code_sha256_prefix":"141b13358e6b0894","entry":"xyxy2xywh","repo":"2023-MindSpore-1/ms-code-105","repo_kind":"listed","path":"src/util.py","file_url":"https://github.com/2023-MindSpore-1/ms-code-105/blob/HEAD/src/util.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":"141b13358e6b0894"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}