{"id":28942399,"url":"https://github.com/measterpojo/partialdomainadpatation","last_synced_at":"2026-05-07T01:36:45.153Z","repository":{"id":299454237,"uuid":"1003091115","full_name":"measterpojo/PartialDomainAdpatation","owner":"measterpojo","description":"Partial Domain Adaptation (PDA) is a domain adaptation scenario where the target domain's label space is a subset of the source domain's label space","archived":false,"fork":false,"pushed_at":"2025-06-16T16:03:25.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-16T17:36:13.184Z","etag":null,"topics":["cnn","computer-vision","deep","deep-neural-networks","deeplearning","domain-adaptation","neual-network","partial","python","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/measterpojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-16T15:55:45.000Z","updated_at":"2025-06-16T16:03:28.000Z","dependencies_parsed_at":"2025-06-16T17:36:54.203Z","dependency_job_id":null,"html_url":"https://github.com/measterpojo/PartialDomainAdpatation","commit_stats":null,"previous_names":["measterpojo/partialdomainadpatation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/measterpojo/PartialDomainAdpatation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measterpojo%2FPartialDomainAdpatation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measterpojo%2FPartialDomainAdpatation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measterpojo%2FPartialDomainAdpatation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measterpojo%2FPartialDomainAdpatation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/measterpojo","download_url":"https://codeload.github.com/measterpojo/PartialDomainAdpatation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/measterpojo%2FPartialDomainAdpatation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261404796,"owners_count":23153457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","computer-vision","deep","deep-neural-networks","deeplearning","domain-adaptation","neual-network","partial","python","pytorch"],"created_at":"2025-06-23T03:30:44.544Z","updated_at":"2026-05-07T01:36:45.148Z","avatar_url":"https://github.com/measterpojo.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PartialDomainAdpatation\nPartial Domain Adaptation (PDA) is a domain adaptation scenario where the target domain's label space is a subset of the source domain's label space\n\n\nClass Conditional Alignment (CCA-PDA)\n\nCCA - is a well-designed method for partial domain adaptation that directly tackles the class mismatch issue between source and target domains.\n\nIt uses a multi-class adversarial loss to perform this alignment, ensuring that only the shared classes between source and target are emphasized. This helps avoid negative transfer from source-only classes.\n\n\nDatasets\n\nCaltech as the source and Office-31 as the target is a classic partial domain adaptation (PDA) scenario, since Caltech has a broader label space (256 classes) while Office-31 has only 31. This means you’ll need to filter out the irrelevant Caltech classes to avoid negative transfer.\n\nupload caltech source from kaggle\n\n\n### Class-Wise Discriminator Training Results\nDuring the **Class Conditional Alignment (CCA-PDA) process**, discriminators are trained per class to distinguish source vs. target domain features. The results below indicate which classes successfully received target samples and which were skipped due to insufficient data.\n\n#### Training Summary\n| Class Index | Source Samples | Target Samples | Status  | Loss Value |\n|------------|---------------|---------------|--------|------------|\n| 0          | 30,607        | 1,106         | ✅ Trained | 0.6472 |\n| 1          | 30,607        | 1,711         | ✅ Trained | 0.6960 |\n| 2          | 0             | 0             | ⚠️ Skipped | N/A |\n| 3          | 0             | 0             | ⚠️ Skipped | N/A |\n| 4          | 0             | 0             | ⚠️ Skipped | N/A |\n| 5          | 0             | 0             | ⚠️ Skipped | N/A |\n| 6          | 0             | 0             | ⚠️ Skipped | N/A |\n| 7          | 0             | 0             | ⚠️ Skipped | N/A |\n| 8          | 0             | 0             | ⚠️ Skipped | N/A |\n| 9          | 0             | 0             | ⚠️ Skipped | N/A |\n\n### Key Observations\n- **Classes 0 \u0026 1 trained successfully**, meaning the model was able to extract enough target samples to align them.\n- **Classes 2–9 were skipped** due to zero source or target samples, implying either dataset mismatch, category absence, or confidence filtering.\n- Lowering the **confidence threshold** (currently `0.7`) may increase target samples for more classes.\n\n### Next Steps\n1. **Verify class overlap** between the source (Caltech-10) and target (Office-31) domains.\n2. **Visualize target feature distributions** to confirm if missing classes exist but lack high-confidence predictions.\n3. **Adjust pseudo-labeling strategies** to better populate underrepresented classes.\n\n\n\nPossible Causes:\n\nClassifier bias toward a few classes\n\nYour classifier might be overfitting to dominant classes in Caltech-10, ignoring others when assigning pseudo-labels.\n\nSome classes may have lower feature separability, making the softmax outputs less confident.\n\nTarget domain shift\n\nDomain shift causes category mismatch—even if some objects in Office-31 belong to a \"shared\" class, the visual domain is different enough that your classifier might not recognize them confidently.\n\nConfidence threshold cutting too aggressively\n\nIf your threshold (confidence_threshold = 0.7) is too high, most target samples won’t qualify as confidently pseudo-labeled.\n\nLowering it to 0.5 or even 0.3 might help populate more classes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeasterpojo%2Fpartialdomainadpatation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeasterpojo%2Fpartialdomainadpatation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeasterpojo%2Fpartialdomainadpatation/lists"}