Skip to content

Code release for our paper COD: Learning Conditional Invariant Representation for Domain Adaptation Regression (ECCV 2024)

License

Notifications You must be signed in to change notification settings

MathAI-LAB/COD

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

COD: Conditional Operator Discrepancy

Code release for our paper COD: Learning Conditional Invariant Representation for Domain Adaptation Regression (ECCV 2024)

Overview

Conditional Operator Discrepancy (COD) is a metric defined for characterizing the discrepancy between conditional distributions, especially for those with continuous conditioning variable. An important application scenario is Domain Adaptation Regression, in which the key problem is the measurement of conditional distribution shift with continuous label variables.

Illustration of COD metric

Network Architecture

Implementation

As described in our paper, the marginal alignment term can be any distribution discrepancy measurement. Therefore, to be consistent with previous work in model architecture and show the potential of COD as a plug-play module, we release a version that both network and optimizer settings are identical with DARE-GRAM. Prerequisites are as follows:

  • Python3
  • numpy
  • PyTorch == 1.12.1 (with CUDA and CuDNN (cu113))
  • torchvision == 0.13.1
  • argparse
  • PIL

Dataset

Dataset used in our paper can be downloaded from DARE-GRAM or RSD. The files should be unziped and put in distinctive folders like:

dSprites
|- color
|- xxx.jpg
|- ...
|- noisy
|- scream
|- color.txt
|- color_test.txt
|- ...
|- dSprites_main.py

Train & Test

The code with default parameters can be run by:

sh dSprites.sh
sh MPI3D.sh

Acknowledgement

  • DARE-GRAM is used as our codebase.
  • RSD is used as our DA baseline.

Citation

If you find this our work helpful, please cite:

@inproceedings{yang2024cod,
title={COD: Learning Conditional Invariant Representation for Domain Adaptation Regression},
author={Yang, Hao Ran, Ren, Chuan Xian and Luo, You Wei},
booktitle={European Conference on Computer Vision},
year={2024}
}

Contact

For any questions about the code or our paper, please feel free to contact yanghr26@mail2.sysu.edu.cn or yanghr842@gmail.com

About

Code release for our paper COD: Learning Conditional Invariant Representation for Domain Adaptation Regression (ECCV 2024)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.0%
  • Shell 4.0%