Dage
Official TensorFlow implementation for "Supervised Domain Adaptation: A Graph Embedding Perspective and a Rectified Experimental Protocol" [TIP 2021] and "Supervised Domain Adaptation using Graph Embedding" [ICPR 2020]
Install / Use
/learn @LukasHedegaard/DageREADME
Domain Adaption using Graph Embedding (DAGE)
Official repository for the the supervised domain adaptation method Domain Adaptation using Graph Embedding (DAGE).
<div align="center"> <img width=600 src="figures/da-architecture.png"><br> </div>In addition to our DAGE-LDA method, we provide implementations of Fine-tuning with gradual unfreeze, and the supervised domain adaptation methods CCSA and d-SNE
Setup
Install dependencies
$ pip install -r requirements.txt
If issues are encountered with scikit-optimize, the exact git tag can be installed via:
pip install git+https://github.com/scikit-optimize/scikit-optimize.git@af5450a51599bbfa4846342188948c147ceba14c
Download datasets
$ ./scripts/get_office.sh
$ ./scripts/get_digits.sh
$ ./scripts/get_visda.sh
Running the code
run.py is the entry-point for running the implemented methods.
To retreive a list of valid arguments, use python run.py --help.
A number of ready-to-run scripts are supplied (found in the scripts folder), with which one can test different methods and configurations.
An example which tunes a model on source data, and tests on target data is
$ ./scripts/office31_tune_source.sh
Running DAGE of Office31 with tuned hyperparameters using the revised training splits is acheived by using.
$ ./scripts/office31_dage_lda_tuned_vgg16_v2.sh
Note: The Office31 experiments were run on two separate occations. The first time was using the standard approach used in much domain adaptation literature. The second time (the accompaning scripts are postfixed with "_v2") the revised data splits were used to ensure generaliseability of the results. For Digits and VisDA, the experiments follow the recitifed protocol.
Hyper-parameter optimisation
hypersearch.py can be used to perform a hyper-parameter search using Bayesian Optimisation.
Script are also supplied for performing a hyperparameter optimisation
$ ./scripts/office31_hypersearch.sh
Results
Office31
The results come in two flavours. One set of results are for the traditional experimental setup, where the test split is used for validation. The other set are for a rectified experimental protocol, in which the test set is used only for final testing and a propper validation split is defined.
<div align="center"> <img src="figures/office_results.png", width=900><br> </div>Digits
<div align="center"> <img src="figures/digits_results_1.png" width=900><br><img src="figures/digits_results_2.png" width=900><br>
</div>VisDA-C
<div align="center"> <img src="figures/visda-results.png" width=450><br> </div>Authors
- Lukas Hedegaard - https://github.com/lukashedegaard
- Omar Ali Sheikh-Omar - https://github.com/sheikhomar
- Alexandros Iosifidis - https://github.com/AlekosIosifidis
Citation
@article{hedegaard2021supervised,
author={Hedegaard, Lukas and Sheikh-Omar, Omar Ali and Iosifidis, Alexandros},
journal={IEEE Transactions on Image Processing},
title={Supervised Domain Adaptation: A Graph Embedding Perspective and a Rectified Experimental Protocol},
year={2021},
volume={30},
number={},
pages={8619-8631},
doi={10.1109/TIP.2021.3118978}
}
@article{hedegaard2020supervised,
title={Supervised Domain Adaptation using Graph Embedding},
author={Lukas Hedegaard and Omar Ali Sheikh-Omar and Alexandros Iosifidis},
journal={International Conference on Pattern Recognition (ICPR)},
year={2020},
}
Related Skills
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
50PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
