{"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/cal-sfda-source-free-domain-adaptive-semantic","title":"Cal-SFDA: Source-Free Domain-adaptive Semantic Segmentation with Differentiable Expected Calibration Error","arxiv_id":"2308.03003","date":"2023-08-06","proceeding":null,"authors":["Zixin Wang","Yadan Luo","Zhi Chen","Sen Wang","Zi Huang"],"abstract":"The prevalence of domain adaptive semantic segmentation has prompted concerns regarding source domain data leakage, where private information from the source domain could inadvertently be exposed in the target domain. To circumvent the requirement for source data, source-free domain adaptation has emerged as a viable solution that leverages self-training methods to pseudo-label high-confidence regions and adapt the model to the target data. However, the confidence scores obtained are often highly biased due to over-confidence and class-imbalance issues, which render both model selection and optimization problematic. In this paper, we propose a novel calibration-guided source-free domain adaptive semantic segmentation (Cal-SFDA) framework. The core idea is to estimate the expected calibration error (ECE) from the segmentation predictions, serving as a strong indicator of the model's generalization capability to the unlabeled target domain. The estimated ECE scores, in turn, assist the model training and fair selection in both source training and target adaptation stages. During model pre-training on the source domain, we ensure the differentiability of the ECE objective by leveraging the LogSumExp trick and using ECE scores to select the best source checkpoints for adaptation. To enable ECE estimation on the target domain without requiring labels, we train a value net for ECE estimation and apply statistic warm-up on its BatchNorm layers for stability. The estimated ECE scores assist in determining the reliability of prediction and enable class-balanced pseudo-labeling by positively guiding the adaptation progress and inhibiting potential error accumulation. Extensive experiments on two widely-used synthetic-to-real transfer tasks show that the proposed approach surpasses previous state-of-the-art by up to 5.25% of mIoU with fair model selection criteria.","url_abs":"https://arxiv.org/abs/2308.03003v1","url_pdf":"https://arxiv.org/pdf/2308.03003v1.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":"cal-sfda-source-free-domain-adaptive-semantic","repo_url":"https://github.com/jo-wang/cal-sfda","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"domain-adaptation","task_name":"Domain Adaptation"},{"task_slug":"model-selection","task_name":"Model Selection"},{"task_slug":"pseudo-label","task_name":"Pseudo Label"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"source-free-domain-adaptation","task_name":"Source-Free Domain Adaptation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2308.03003","atlas_url":"https://app.syntology.ai/?focus=2308.03003","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.03003"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/jo-wang/cal-sfda","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":9,"ran_honours":1,"unverified":8},"by_repo_kind":{"official":{"samples":19,"ran":11,"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":"fac5364e2f53c6db","entry":"conv3x3","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"model/DeeplabV2.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/model/DeeplabV2.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":"660b29e7beb7f344","entry":"convert_model","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"model/sync_batchnorm/batchnorm.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/model/sync_batchnorm/batchnorm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"660b29e7beb7f344"}},{"code_sha256_prefix":"adc5e415cd269dea","entry":"easy_dic","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"init_config.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/init_config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"adc5e415cd269dea"}},{"code_sha256_prefix":"dbd857469a2a2157","entry":"match_decoder","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"model/model_builder.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/model/model_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dbd857469a2a2157"}},{"code_sha256_prefix":"553ee7cf40b15657","entry":"match_encoder","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"model/model_builder.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/model/model_builder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"553ee7cf40b15657"}},{"code_sha256_prefix":"820856f2c847b605","entry":"model_all","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"rl/model.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/rl/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"820856f2c847b605"}},{"code_sha256_prefix":"ea9d77c576d902c2","entry":"model_cla","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"rl/model.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/rl/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea9d77c576d902c2"}},{"code_sha256_prefix":"e65df5dbb694bf60","entry":"model_fea","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"rl/model.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/rl/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e65df5dbb694bf60"}},{"code_sha256_prefix":"27504cbeb5811ea6","entry":"outS","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"model/DeeplabV2.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/model/DeeplabV2.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":"27504cbeb5811ea6"}},{"code_sha256_prefix":"da448e86441b1d0f","entry":"show_config","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"init_config.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/init_config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"da448e86441b1d0f"}},{"code_sha256_prefix":"3ecaaabd66c84b40","entry":"type_align","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"init_config.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/init_config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3ecaaabd66c84b40"}},{"code_sha256_prefix":"5820fad2bdccbd42","entry":"Res_Deeplab","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"model/DeeplabV2.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/model/DeeplabV2.py","link_basis":"first_harvest_node","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":"5820fad2bdccbd42"}},{"code_sha256_prefix":"00ca137305a82c79","entry":"adjust_brightness","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"dataset/transforms.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/dataset/transforms.py","link_basis":"first_harvest_node","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":"00ca137305a82c79"}},{"code_sha256_prefix":"6d77c5d0ac004f32","entry":"adjust_contrast","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"dataset/transforms.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/dataset/transforms.py","link_basis":"first_harvest_node","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":"6d77c5d0ac004f32"}},{"code_sha256_prefix":"d15084eefd04a282","entry":"adjust_saturation","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"dataset/transforms.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/dataset/transforms.py","link_basis":"first_harvest_node","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":"d15084eefd04a282"}},{"code_sha256_prefix":"81030351171d2c98","entry":"init_model","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"model/model_builder.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/model/model_builder.py","link_basis":"first_harvest_node","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":"81030351171d2c98"}},{"code_sha256_prefix":"11ad33d0bb84b1ed","entry":"init_source_dataset","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"dataset/dataset.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/dataset/dataset.py","link_basis":"first_harvest_node","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":"11ad33d0bb84b1ed"}},{"code_sha256_prefix":"6d4f75928375cf4a","entry":"init_target_dataset","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"dataset/dataset.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/dataset/dataset.py","link_basis":"first_harvest_node","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":"6d4f75928375cf4a"}},{"code_sha256_prefix":"5579322fe3a7d79a","entry":"init_test_dataset","repo":"jo-wang/cal-sfda","repo_kind":"official","path":"dataset/dataset.py","file_url":"https://github.com/jo-wang/cal-sfda/blob/HEAD/dataset/dataset.py","link_basis":"first_harvest_node","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":"5579322fe3a7d79a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}