{"id":13738503,"url":"https://github.com/Evgeneus/Graph-Domain-Adaptaion","last_synced_at":"2025-05-08T16:34:27.479Z","repository":{"id":37310977,"uuid":"351196455","full_name":"Evgeneus/Graph-Domain-Adaptaion","owner":"Evgeneus","description":"PyTorch code for the paper \"Curriculum Graph Co-Teaching for Multi-target Domain Adaptation\" (CVPR2021)","archived":false,"fork":false,"pushed_at":"2021-07-06T10:19:54.000Z","size":3225,"stargazers_count":98,"open_issues_count":2,"forks_count":18,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-04T03:12:44.319Z","etag":null,"topics":["cdan","computer-vision","coteaching","curriculum-learning","domain-adaptation","domainnet","graph-convolutional-networks","graph-domain-adaptation","graph-neural-networks","mtdap","office","pacs","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Evgeneus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-24T19:15:44.000Z","updated_at":"2024-06-01T07:01:54.000Z","dependencies_parsed_at":"2022-09-03T14:52:33.002Z","dependency_job_id":null,"html_url":"https://github.com/Evgeneus/Graph-Domain-Adaptaion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evgeneus%2FGraph-Domain-Adaptaion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evgeneus%2FGraph-Domain-Adaptaion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evgeneus%2FGraph-Domain-Adaptaion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Evgeneus%2FGraph-Domain-Adaptaion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Evgeneus","download_url":"https://codeload.github.com/Evgeneus/Graph-Domain-Adaptaion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224746832,"owners_count":17363125,"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":["cdan","computer-vision","coteaching","curriculum-learning","domain-adaptation","domainnet","graph-convolutional-networks","graph-domain-adaptation","graph-neural-networks","mtdap","office","pacs","pytorch"],"created_at":"2024-08-03T03:02:24.293Z","updated_at":"2024-11-15T07:31:17.768Z","avatar_url":"https://github.com/Evgeneus.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## PyTorch code for the paper \"Curriculum Graph Co-Teaching for Multi-target Domain Adaptation\" (CVPR2021)\nThis repo presents PyTorch implementation of Multi-targe Graph Domain Adaptation framework from [\"Curriculum Graph Co-Teaching for Multi-target Domain Adaptation\" CVPR 2021](https://arxiv.org/abs/).\nThe framework is pivoted around two key concepts: *graph feature aggregation* and *curriculum learning* (see pipeline below or [project web-page](https://roysubhankar.github.io/graph-coteaching-adaptation/)).\n\u003cimg src=\"data/pipeline.png\" width=\"1000\"\u003e\n## Results\n\u003cimg src=\"data/results.png\" width=\"600\"\u003e\n\n## Environment\n```\nPython \u003e= 3.6\nPyTorch \u003e= 1.8.1\n```\nTo install dependencies run (line 1 for pip or line 2 for conda env): \n```\npip install -r requirements.txt\nconda install --file requirements.txt\n```\n*Disclaimer.*  This code has been tested with cuda toolkit 10.2. Please install PyTorch as supported by your machine.\n\n\n## Datasets\nFour datasets are supported:\n* Office-31 ([Kate Saenko et al., 2010](https://link.springer.com/content/pdf/10.1007/978-3-642-15561-1_16.pdf))\n* Office-Home ([Venkateswara et al., 2017](https://arxiv.org/abs/1706.07522))\n* PACS ([Li et al., 2017](https://arxiv.org/abs/1710.03077))\n* DomainNet ([Peng et al., 2019](http://ai.bu.edu/M3SDA/))\n\nTo run this code, one must check if the txt file names in data/\u003cdataset_name\u003e are matching with the downloaded domain folders. For e.g.,  to run OfficeHome, the domain sub-folders should be art/, clipart/, product/ and real/ corresponding to art.txt, clipart.txt, product.txt and real.txt that can be found in the data/office-home/.\n\n## Methods\n* CDAN\n* CDAN+E\n\n## Commands\n## Office-31\nRun D-CGCT:\n```\npython src/main_dcgct.py \\\n        --method 'CDAN' \\\n        --encoder 'ResNet50' \\\n \t--dataset 'office31' \\\n \t--data_root [your office31 folder] \\\n \t--source 'webcam' \\\n \t--target 'dslr' 'amazon' \\\n \t--source_iters 200 \\\n \t--adapt_iters 3000 \\\n \t--finetune_iters 15000 \\\n \t--lambda_node 0.3 \\\n \t--output_dir 'office31-dcgct/webcam_rest/CDAN'\n```\nRun CGCT:\n```\npython src/main_cgct.py \\\n        --method 'CDAN' \\\n        --encoder 'ResNet50' \\\n \t--dataset 'office31' \\\n \t--data_root [your office31 folder] \\\n \t--source 'webcam' \\\n \t--target 'dslr' 'amazon' \\\n \t--source_iters 100 \\\n \t--adapt_iters 3000 \\\n \t--finetune_iters 15000 \\\n \t--lambda_node 0.1 \\\n \t--output_dir 'office31-cgct/webcam_rest/CDAN'\n```\n\n## Office-Home\n```\npython src/main_dcgct.py \\\n\t--method 'CDAN' \\\n\t--encoder 'ResNet50' \\\n\t--dataset 'office-home' \\\n\t--data_root [your OfficeHome folder] \\\n\t--source 'art' \\\n\t--target 'clipart' 'product' 'real' \\\n\t--source_iters 500 \\\n\t--adapt_iters 10000 \\\n\t--finetune_iters 15000 \\\n\t--lambda_node 0.3 \\\n\t--output_dir 'officeHome-dcgct/art_rest/CDAN' \n```\n```\npython src/main_cgct.py \\\n\t--method 'CDAN' \\\n\t--encoder 'ResNet50' \\\n\t--dataset 'office-home' \\\n\t--data_root [your OfficeHome folder] \\\n\t--source 'art' \\\n\t--target 'clipart' 'product' 'real' \\\n\t--source_iters 500 \\\n\t--adapt_iters 5000 \\\n\t--finetune_iters 15000 \\\n\t--lambda_node 0.1 \\\n\t--output_dir 'officeHome-cgct/art_rest/CDAN' \n```\n\n## PACS\n```\npython src/main_dcgct.py \\\n\t--method 'CDAN' \\\n\t--encoder 'ResNet50' \\\n\t--dataset 'pacs' \\\n\t--data_root [your PACS folder] \\\n\t--source 'photo' \\\n\t--target 'cartoon' 'art_painting' 'sketch' \\\n\t--source_iters 200 \\\n\t--adapt_iters 3000 \\\n\t--finetune_iters 15000  \\\n\t--lambda_node 0.1 \\\n\t--output_dir 'pacs-dcgct/photo_rest/CDAN'  \n```\n```\npython src/main_cgct.py \\\n\t--method 'CDAN' \\\n\t--encoder 'ResNet50' \\\n\t--dataset 'pacs' \\\n\t--data_root [your PACS folder] \\\n\t--source 'photo' \\\n\t--target 'cartoon' 'art_painting' 'sketch' \\\n\t--source_iters 200 \\\n\t--adapt_iters 3000 \\\n\t--finetune_iters 15000  \\\n\t--lambda_node 0.1 \\\n\t--output_dir 'pacs-cgct/photo_rest/CDAN'  \n```\n\n## DomainNet\n```\npython src/main_dcgct.py \\\n\t--method 'CDAN' \\\n\t--encoder 'ResNet101' \\\n\t--dataset 'domain-net' \\\n\t--data_root [your DomainNet folder] \\\n\t--source 'sketch' \\\n\t--target 'clipart' 'infograph' 'painting' 'real' 'quickdraw' \\\n\t--source_iters 5000 \\\n\t--adapt_iters 50000 \\\n\t--finetune_iters 15000  \\\n\t--lambda_node 0.3 \\\n\t--output_dir 'domainNet-dcgct/sketch_rest/CDAN'\n```\n```\npython src/main_cgct.py \\\n\t--method 'CDAN' \\\n\t--encoder 'ResNet101' \\\n\t--dataset 'domain-net' \\\n\t--data_root [your DomainNet folder] \\\n\t--source 'sketch' \\\n\t--target 'clipart' 'infograph' 'painting' 'real' 'quickdraw' \\\n\t--source_iters 5000 \\\n\t--adapt_iters 50000 \\\n\t--finetune_iters 15000  \\\n\t--lambda_node 0.3 \\\n\t--output_dir 'domainNet-cgct/sketch_rest/CDAN'\n```\n## Citation\nIf you find our paper and code useful for your research, please consider citing our paper.\n```\n@inproceedings{roy2021curriculum,\n  title={Curriculum Graph Co-Teaching for Multi-target Domain Adaptation},\n  author={Roy, Subhankar and Krivosheev, Evgeny and Zhong, Zhun and Sebe, Nicu and Ricci, Elisa},\n  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},\n  year={2021}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEvgeneus%2FGraph-Domain-Adaptaion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEvgeneus%2FGraph-Domain-Adaptaion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEvgeneus%2FGraph-Domain-Adaptaion/lists"}