Giter Club home page Giter Club logo

ckb's Introduction

Conditional Bures Metric for Domain Adaptation

This is the Pytorch implementation for Conditional Bures Metric for Domain Adaptation (CKB) (CVPR 2021).

[PDF] [Poster] [Video]

Overview

"Conditional Kernel Bures (CKB) is a conditional distribution adaptation model, which explores Wasserstein-Bures geometry and learns conditional invariant representations for knowledge transfer."

Insight

CKB_Insight

Network Architectures

NetworkArchitectures

Environments

  • Ubuntu 18.04
  • python 3.6
  • PyTorch 1.0

Dataset

  • The datasets should be placed in ./dataset, e.g.,

    ./dataset/OfficeHome

  • The structure of the datasets should be like

OfficeHome (Dataset)
|- Art (Domain)
|  |- Alarm_Clock (Class)
|     |- XXXX.jpg (Sample) 
|     |- ...
|  |- Backpack (Class)
|  |- ...
|- Clipart (Domain)
|- Product (Domain)
|- Real_World (Domain)

Train & Test

  • For OfficeHome dataset with SGD or Adam optimizer, please run

    python main.py --dataset OfficeHome --exp_times 10 --batch_size 40 --CKB_lambda 1e-1 -- CKB_type hard --inv_epsilon 1e-2 --lr 1e-3 --optim_param GD
    python main.py --dataset OfficeHome --exp_times 10 --batch_size 40 --CKB_lambda 1e-1 -- CKB_type hard --inv_epsilon 1e-2 --lr 3e-4
    
  • For ImageCLEF dataset with SGD or Adam optimizer, please run

    python main.py --dataset ImageCLEF --exp_times 10 --batch_size 40 --CKB_lambda 1e0 --inv_epsilon 1e-1 --lr 1e-3 --optim_param GD
    python main.py --dataset ImageCLEF --exp_times 10 --batch_size 40 --CKB_lambda 1e0 --inv_epsilon 1e-1 --lr 3e-4
    

Citation

If this repository is helpful for you, please cite our paper:

@inproceedings{luo2021conditional,
  title={Conditional Bures Metric for Domain Adaptation},
  author={Luo, You Wei and Ren, Chuan Xian},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={13989--13998},
  year={2021}
}

Contact

If you have any questions, please feel free contact me via [email protected].

ckb's People

Contributors

lavieluo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

obsinaan

ckb's Issues

When I want to port CKB to my project, some errors occur

Traceback (most recent call last):

train(epoch)

CKB_loss = CKButils.CKB_Metric(source, target, s_label, plab_t, t_pred, n_classes, inv_epsilon,CKB_type)

U_n, S_n, V_n = torch.svd(Nuclear)

RuntimeError: svd_cuda: For batch 0: U(33,33) is zero, singular U.

Can anyone solve the above problem, I would appreciate any help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.