├── .gitignore ├── README.md └── pytorch ├── README.md ├── data ├── imagenet-caltech │ ├── caltech_256_list.txt │ ├── caltech_84_list.txt │ └── imagenet_val_84_list.txt ├── office-home │ ├── Art.txt │ ├── Art_shared.txt │ ├── Clipart.txt │ ├── Clipart_shared.txt │ ├── Product.txt │ ├── Product_shared.txt │ ├── Real_World.txt │ └── Real_World_shared.txt └── office │ ├── amazon_10_list.txt │ ├── amazon_31_list.txt │ ├── dslr_10_list.txt │ ├── dslr_31_list.txt │ ├── webcam_10_list.txt │ └── webcam_31_list.txt └── src ├── __init__.py ├── data_list.py ├── loss.py ├── lr_schedule.py ├── network.py ├── pre_process.py └── train_pada.py /.gitignore: -------------------------------------------------------------------------------- 1 | ## General 2 | 3 | # Compiled Object files 4 | *.slo 5 | *.lo 6 | *.o 7 | *.cuo 8 | 9 | # Compiled Dynamic libraries 10 | *.so 11 | *.dylib 12 | 13 | # Compiled Static libraries 14 | *.lai 15 | *.la 16 | *.a 17 | 18 | # Compiled protocol buffers 19 | *.pb.h 20 | *.pb.cc 21 | *_pb2.py 22 | 23 | # Compiled python 24 | *.pyc 25 | 26 | # Compiled MATLAB 27 | *.mex* 28 | 29 | # IPython notebook checkpoints 30 | .ipynb_checkpoints 31 | 32 | # Editor temporaries 33 | *.swp 34 | *.swo 35 | *~ 36 | 37 | # Sublime Text settings 38 | *.sublime-workspace 39 | *.sublime-project 40 | 41 | # Eclipse Project settings 42 | *.*project 43 | .settings 44 | 45 | # QtCreator files 46 | *.user 47 | 48 | # PyCharm files 49 | .idea 50 | 51 | # Visual Studio Code files 52 | .vscode 53 | 54 | # OSX dir files 55 | .DS_Store 56 | 57 | ## Caffe 58 | 59 | # User's build configuration 60 | Makefile.config 61 | 62 | # Data and models are either 63 | # 1. reference, and not casually committed 64 | # 2. custom, and live on their own unless they're deliberated contributed 65 | *.caffemodel 66 | *.caffemodel.h5 67 | *.solverstate 68 | *.solverstate.h5 69 | *leveldb 70 | *lmdb 71 | 72 | # build, distribute, and bins (+ python proto bindings) 73 | build 74 | .build_debug/* 75 | .build_release/* 76 | distribute/* 77 | *.testbin 78 | *.bin 79 | python/caffe/proto/ 80 | cmake_build 81 | .cmake_build 82 | 83 | # Generated documentation 84 | docs/_site 85 | docs/gathered 86 | _site 87 | doxygen 88 | docs/dev 89 | 90 | # LevelDB files 91 | *.sst 92 | *.ldb 93 | LOCK 94 | LOG* 95 | CURRENT 96 | MANIFEST-* 97 | 98 | pytorch/snapshot/* 99 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PADA 2 | PADA Library 3 | 4 | This is the code release for ["Partial Adversarial Domain Adaptation" (ECCV 2018)](https://arxiv.org/pdf/1808.04205.pdf) 5 | 6 | The pytorch version is in directory "pytorch". We have released the version test on PyTorch Version 0.3.1. Details of the codes are described in the README.md in "pytorch" directory. 7 | 8 | ## Citation 9 | If you use this code for your research, please consider citing: 10 | 11 | 12 | ## Contact 13 | If you have any problem about our code, feel free to contact 14 | - caozhangjie14@gmail.com 15 | - longmingsheng@gmail.com 16 | 17 | or describe your problem in Issues. 18 | -------------------------------------------------------------------------------- /pytorch/README.md: -------------------------------------------------------------------------------- 1 | # PADA 2 | PyTorch implementation for [Partial Adversarial Domain Adaptation (ECCV 2018)] 3 | 4 | ## Prerequisites 5 | Linux or OSX 6 | 7 | NVIDIA GPU + CUDA (may CuDNN) and corresponding PyTorch framework (version 0.3.1) 8 | 9 | Python 2.7/3.5 10 | 11 | ## Datasets 12 | We use Office-31, Office-Home and ImageNet-Caltech dataset in our experiments. We use [Office-31](https://people.eecs.berkeley.edu/~jhoffman/domainadapt), [Caltech-256](http://www.vision.caltech.edu/Image_Datasets/Caltech256) and [ImageNet-2012](http://www.image-net.org) datasets. The ImageNet-Caltech dataset will be published soon. 13 | 14 | The lists of dataset are in [data](./data) directory. The "data/imagenet-caltech/imagenet_1000_list.txt" is too large, we put it on the [google drive](https://drive.google.com/open?id=1QARHJoxVpyB2EQZyrBbBHSiEQjBowPD2). 15 | 16 | For Office-31 dataset, "name_31_list.txt"(name="amazon", "webcam", "dslr") is the source list file and "name_10_list.txt" is the target list file. 17 | 18 | For Office-Home dataset, "name.txt"(name="Art", "Clipart", "Product", "Real_World") is the source list file and "name_shared.txt" is the target list file. 19 | 20 | For ImageNet-Caltech dataset, "imagenet_1000_list.txt" is the source file list for task "I->C" and "caltech_84_list.txt" is the target file list. "caltech_256_list.txt" is the source file list for task "C->I" and "imagenet_val_84_list.txt" is the target file list. 21 | 22 | You can also modify the list file(txt format) in ./data as you like. Each line in the list file follows the following format: 23 | ``` 24 |