Code Monkey home page Code Monkey logo

ccsa's Introduction

CCSA: "Unified Deep Supervised Domain Adaptation and Generalization" (ICCV 2017)

Requiremenrts

keras and numpy

Introduction

This repository provides the implementation of the paper "Unified Deep Supervised Domain Adaptation and Generalization" published in ICCV 2017. It also contains the training/testing splits of two cross domain adaptation task (MNIST->USPS and USPS->MNIST).

We are interested in the supervised domain adaptation when very few labeled target samples are available in training (from 1 to 7).

Experimental setting involves randomly selecting 2000 images from MNIST and 1800 images from USPS. Here, we randomly selected n labeled samples per class from target domain data and used them in training. We evaluated our approach for n ranging from 1 to 7 and repeated each experiment 10 times. Therefore, we provided data we used to generate the results. Data files are located in the 'row_data' subdirectory.

"We encourage researchers to use this data for comparison."

Implementation

To reproduce the results of the paper you just need to run main.py. There are three main parameters:

  1. sample_per_class = 1 or 2 or ... or 7 (sample_per_class specifies the number of labeled target data per class.)

  2. repetition = 0 or 2 or ... or 9. (We repeat the experiments 10 times and report the average accuracies.)

  3. domain_adaptation_task = 'MNIST_to_USPS' or 'USPS_to_MNIST'

There are some other hyperparameters that you may change for the new dataset.

Citation

@InProceedings{motiian2017CCSA, Title = {Unified Deep Supervised Domain Adaptation and Generalization},

Author = {Motiian, Saeid and Piccirilli, Marco and Adjeroh, Donald A. and Doretto, Gianfranco},

Booktitle = {IEEE International Conference on Computer Vision (ICCV)},

Year = {2017}}

For more information:

http://vision.csee.wvu.edu/~motiian/Details/CCSA.html

ccsa's People

Contributors

samotiian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccsa's Issues

Question about results of different repetitions?

Hello! Thank you for sharing the code of CCSA in Github. I'm new to Domain Adaptation and I want to reproduce the result of CCSA. But I have a question.

In MNIST-USPS experiment, the paper says that

We evaluated our approach for n ranging from 1 to 8 and repeated each experiment 10 times(we only show the mean of the accuracies because the standard deviation is very small).

Ref: Section 5.1.2 in ICCV paper (https://arxiv.org/pdf/1709.10190.pdf)

But the results between different repetitions in my reproduced is not very small?(acc between 86 and 94)?Is that normal?

Please forgive me if I ask a silly question.

Code of Domain generalization

Hi, @samotiian , thank you for your implementation. With respect to the code, could you please upload the code for domain generalization? It would be great help for reproducing the experiment results.
Thanks,

Question about row_data.

Hello, the pic in MNIST is 28 * 28 and the pic in USPS is 16 * 16. Do you preprocess MNIST to make it into 16*16? And do you use the MMD to handle the date in the both two datasets? Thank you.

A question about raw data

Hello, is the raw data just from MNIST and USPS dataset or is preprocessed by some methods like MMD? I am really confused about this, looking froward your answer. Thank you very much.

I think the code has errors

Hi there, very excellent work!
I reproduce the experiment this afternoon. However, when I run main.py, the code doesn't work at all.
It says there is no such file named ./row_data/MNIST_to_USPS_X_train_target_repetition_0_sample_per_class_1.npy
I checked the disk, there is no such file.
Plus, there is also no 'y_' file. Could you please check the repo?

Question about the experimental detail

Hi, thank you for sharing the code! It is beneficial for me to understand the detail of the method.

I have two questions:
(1) I think your implementation uses Convolutio2D(32, 3, 3). However, the paper says that uses Convolution2D(6, 5, 5), which is inconsistent. Which is correct for reproducing the results?

Quick Ref: Section 5.1.2 in ICCV paper (https://arxiv.org/pdf/1709.10190.pdf)

Similar to [37], we used 2 convolutional layers with 6 and 16 filters of 5 ร— 5 kernels followed by max-pooling layers and 2 fully connected layers with size 120 and 84 ...

(2) Your implementation also uses Dropout in some parts. Is this also used for the reported values?

Thanks.

Model doesn't reset between experiment runs

Hi, thank You for making the code publicly available.
There is a subtle bug in the implementation when multiple experiments are run. Tensorflow and Keras do not reset model parameters automatically, so by training the model in a loop with varying data, the model is accumulating knowledge from all splits, and not only one as intended.

I have created a pull request (#9) that fixes the issue.

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.