{"id":13712254,"url":"https://github.com/easezyc/deep-transfer-learning","last_synced_at":"2025-05-06T21:33:50.133Z","repository":{"id":50348243,"uuid":"139953476","full_name":"easezyc/deep-transfer-learning","owner":"easezyc","description":"A collection of implementations of deep domain adaptation algorithms","archived":false,"fork":false,"pushed_at":"2022-03-03T07:30:28.000Z","size":7334,"stargazers_count":890,"open_issues_count":6,"forks_count":205,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-13T22:35:39.128Z","etag":null,"topics":["deep-transfer-learning","domain-adaptation","pytorch","transfer-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","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/easezyc.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}},"created_at":"2018-07-06T08:06:17.000Z","updated_at":"2024-11-06T06:55:43.000Z","dependencies_parsed_at":"2022-09-05T01:31:45.237Z","dependency_job_id":null,"html_url":"https://github.com/easezyc/deep-transfer-learning","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/easezyc%2Fdeep-transfer-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easezyc%2Fdeep-transfer-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easezyc%2Fdeep-transfer-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easezyc%2Fdeep-transfer-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easezyc","download_url":"https://codeload.github.com/easezyc/deep-transfer-learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772536,"owners_count":21801941,"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":["deep-transfer-learning","domain-adaptation","pytorch","transfer-learning"],"created_at":"2024-08-02T23:01:16.437Z","updated_at":"2025-05-06T21:33:48.769Z","avatar_url":"https://github.com/easezyc.png","language":"Python","funding_links":[],"categories":["Table of Contents","Python","Benchmarks"],"sub_categories":["Others","Disentangled Representation Learning"],"readme":"# Deep Transfer Learning in PyTorch\n[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT) \n\nThis is a PyTorch library for deep transfer learning. We divide the code into two\naspects: Single-source Unsupervised Domain Adaptation (SUDA) and Multi-source Unsupervised Domain Adaptation (MUDA). There are many SUDA methods, however I find there is a few MUDA methods with deep learning. Besides, MUDA with deep learning might be a more promising direction for domain adaptation.\n\nHere I have implemented some deep transfer methods as follows:\n* UDA\n    * DDC：Deep Domain Confusion Maximizing for Domain Invariance\n    * DAN: Learning Transferable Features with Deep Adaptation Networks (ICML2015)\n    * Deep Coral: Deep CORAL Correlation Alignment for Deep Domain Adaptation (ECCV2016)\n    * Revgrad: Unsupervised Domain Adaptation by Backpropagation (ICML2015)\n    * MRAN: Multi-representation adaptation network for cross-domain image classification (Neural Network 2019)\n    * DSAN: Deep Subdomain Adaptation Network for Image Classification (IEEE Transactions on Neural Networks and Learning Systems 2020)\n* MUDA\n    * Aligning Domain-specific Distribution and Classifier for Cross-domain Classification from Multiple Sources (AAAI2019)\n* Application\n    * Cross-domain Fraud Detection: Modeling Users’ Behavior Sequences with Hierarchical Explainable Network for Cross-domain Fraud Detection (WWW2020)\n    * Learning to Expand Audience via Meta Hybrid Experts and Critics for Recommendation and Advertising (KDD2021)\n* Survey\n    * [A Comprehensive Survey on Transfer Learning](https://arxiv.org/abs/1911.02685) (Proc. IEEE)\n\n\n## Results on Office31(UDA)\n| Method | A - W | D - W | W - D | A - D | D - A | W - A | Average |\n|:--------------:|:-----:|:-----:|:-----:|:-----:|:----:|:----:|:-------:|\n| ResNet | 68.4±0.5 | 96.7±0.5 | 99.3±0.1 | 68.9±0.2 | 62.5±0.3 | 60.7±0.3 | 76.1 |\n| DDC | 75.8±0.2 | 95.0±0.2 | 98.2±0.1 | 77.5±0.3 | 67.4±0.4 | 64.0±0.5 | 79.7 |\n| DDC\\* | 78.3±0.4 | 97.1±0.1 | 100.0±0.0 | 81.7±0.9 | 65.2±0.6 | 65.1±0.4 | 81.2 |\n| DAN | 83.8±0.4 | 96.8±0.2 | 99.5±0.1 | 78.4±0.2 | 66.7±0.3 | 62.7±0.2 | 81.3 |\n| DAN\\* | 82.6±0.7 | 97.7±0.1 | 100.0±0.0 | 83.1±0.9 | 66.8±0.3 | 66.6±0.4 | 82.8 |\n| DCORAL\\* | 79.0±0.5 | 98.0±0.2 | 100.0±0.0 | 82.7±0.1 | 65.3±0.3 | 64.5±0.3 | 81.6 |\n| Revgrad | 82.0±0.4 | 96.9±0.2 | 99.1±0.1 | 79.7±0.4 | 68.2±0.4 | 67.4±0.5 | 82.2 |\n| Revgrad\\* | 82.6±0.9 | 97.8±0.2 | 100.0±0.0 | 83.3±0.9 | 66.8±0.1 | 66.1±0.5 | 82.8 |\n| MRAN | 91.4±0.1 | 96.9±0.3 | 99.8±0.2 | 86.4±0.6 | 68.3±0.5 | 70.9±0.6 | 85.6 |\n| DSAN | 93.6±0.2 | 98.4±0.1 | 100.0±0.0 | 90.2±0.7 | 73.5±0.5 | 74.8±0.4 | 88.4 |\n\n\u003e Note that the results without '\\*' comes from [paper](http://ise.thss.tsinghua.edu.cn/~mlong/doc/multi-adversarial-domain-adaptation-aaai18.pdf). The results with '\\*' are run by myself with the code. \n\n## Results on Office31(MUDA)\n| Standards | Method | A,W - D | A,D - W | D,W - A | Average |\n|:--------------:|:--------------:|:-----:|:-----:|:-----:|:-------:|\n| | ResNet | 99.3 | 96.7 | 62.5 | 86.2 |\n|  | DAN | 99.5 | 96.8 | 66.7 | 87.7 |\n| Single Best| DCORAL | 99.7 | 98.0 | 65.3 | 87.7 |\n|  | RevGrad | 99.1 | 96.9 | 68.2 | 88.1 |\n||\n|  | DAN | 99.6 | 97.8 | 67.6 | 88.3 |\n| Source Combine | DCORAL | 99.3 | 98.0 | 67.1 | 88.1 |\n|  | RevGrad | 99.7 | 98.1 | 67.6 | 88.5 |\n||\n| Multi-Source | MFSAN | 99.5 | 98.5 | 72.7 | 90.2 |\n\n## Results on OfficeHome(MUDA)\n| Standards | Method | C,P,R - A | A,P,R - C | A,C,R - P | A,C,P - R | Average |\n|:--------------:|:--------------:|:-----:|:-----:|:-----:|:-----:|:-------:|\n| | ResNet | 65.3 | 49.6 | 79.7 | 75.4 | 67.5 |\n|  | DAN | 64.1 | 50.8 | 78.2 | 75.0 | 67.0 |\n| Single Best | DCORAL | 68.2 | 56.5 | 80.3 | 75.9 | 70.2 |\n|  | RevGrad | 67.9 | 55.9 | 80.4 | 75.8 | 70.0 |\n||\n|  | DAN | 68.5 | 59.4 | 79.0 | 82.5 | 72.4 |\n| Source Combine | DCORAL | 68.1 | 58.6 | 79.5 | 82.7 | 72.2 |\n|  | RevGrad | 68.4 | 59.1 | 79.5 | 82.7 | 72.4 |\n||\n| Multi-Source | MFSAN | 72.1 | 62.0 | 80.3 | 81.8 | 74.1 |\n\n\u003e Note that  (1) Source combine: all source domains are combined together into a traditional single-source v.s. target setting. (2) Single best: among the multiple source domains, we report the best single source transfer results. (3) Multi-source: the results of MUDA methods.\n\n## Note\n\u003e If you find that your accuracy is 100%, the problem might be the dataset folder. Please note that the folder structure required for the data provider to work is:\n```\n-dataset\n    -amazon\n    -webcam\n    -dslr\n```\n\n\n## Contact\nIf you have any problem about this library, please create an Issue or send us an Email at:\n* zhuyongchun18s@ict.ac.cn\n* jindongwang@outlook.com\n\n\n## Reference\nIf you use this repository, please cite the following papers:\n\n```\n@inproceedings{zhu2019aligning,\n  title={Aligning domain-specific distribution and classifier for cross-domain classification from multiple sources},\n  author={Zhu, Yongchun and Zhuang, Fuzhen and Wang, Deqing},\n  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},\n  volume={33},\n  pages={5989--5996},\n  year={2019}\n}\n```\n\n```\n@article{zhu2020deep,\n  title={Deep subdomain adaptation network for image classification},\n  author={Zhu, Yongchun and Zhuang, Fuzhen and Wang, Jindong and Ke, Guolin and Chen, Jingwu and Bian, Jiang and Xiong, Hui and He, Qing},\n  journal={IEEE transactions on neural networks and learning systems},\n  volume={32},\n  number={4},\n  pages={1713--1722},\n  year={2020},\n  publisher={IEEE}\n}\n```\n\n```\n@article{zhu2019multi,\n  title={Multi-representation adaptation network for cross-domain image classification},\n  author={Zhu, Yongchun and Zhuang, Fuzhen and Wang, Jindong and Chen, Jingwu and Shi, Zhiping and Wu, Wenjuan and He, Qing},\n  journal={Neural Networks},\n  volume={119},\n  pages={214--221},\n  year={2019},\n  publisher={Elsevier}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasezyc%2Fdeep-transfer-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasezyc%2Fdeep-transfer-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasezyc%2Fdeep-transfer-learning/lists"}