Code Monkey home page Code Monkey logo

ucdir.paddle's Introduction

Feature Representation Learning for Unsupervised Cross-domain Image Retrieval

This repository contains the PyTorch implementation for our ECCV2022 paper "Feature Representation Learning for Unsupervised Cross-domain Image Retrieval".

teaser

Current supervised cross-domain image retrieval methods can achieve excellent performance. However, the cost of data collection and labeling imposes an intractable barrier to practical deployment in real applications. In this paper, we investigate the unsupervised cross-domain image retrieval task, where class labels and pairing annotations are no longer a prerequisite for training. This is an extremely challenging task because there is no supervision for both in-domain feature representation learning and cross-domain alignment. We address both challenges by introducing: 1) a new cluster-wise contrastive learning mechanism to help extract class semantic-aware features, and 2) a novel distance-of-distance loss to effectively measure and minimize the domain discrepancy without any external supervision.

Getting started

Clone this repository and create a virtual environment as the follows:

  conda create -n ucdir python=3.8.8
  conda activate ucdir
  conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
  pip install -r requirements.txt

Download

Datasets

Pre-trained model

  • MoCo v2 model: Download the MoCo v2 model trained after 800 epochs.

Running

For Office-Home, you can modify line 7-8 in ./scripts/office-home.sh accordingly to train with the selected domain pair:

CUDA_VISIBLE_DEVICES=0 ./scripts/office-home.sh

For DomainNet, you can modify line 7-8 in ./scripts/domainnet.sh accordingly to train with the selected domain pair:

CUDA_VISIBLE_DEVICES=0 ./scripts/domainnet.sh

Acknowledgement

This repository is built based on the source code for MoCo v2

Citation

If you find our work helpful to your reseach, please cite our paper:

@inproceedings{hu2022feature,
  title={Feature Representation Learning for Unsupervised Cross-domain Image Retrieval},
  author={Hu, Conghui and Lee, Gim Hee},
  booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
  year={2022}}

ucdir.paddle's People

Contributors

wenmuzhou avatar

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.