Code Monkey home page Code Monkey logo

adversarial-feature-augmentation's Introduction

CVPR2018

Step 0: training a classifier on source data.

Step 1: training a feature generator to perform feature augmentation in the source feature space.

Step 2: training an encoder by adapting it to the source features.

Overview

Files

model.py: contains the models described in the paper, implemented in Tensorflow (slim)

trainOps.py: contains the operations to perform Step 0, Step 1 and Step 2.

Prerequisites

Python 2.7, Tensorflow 1.3

See 'python3' branch for a version compatible with Python 3

How it works

To obtain MNIST and SVHN dataset, run

python download_and_process_mnist.py
sh download_svhn.sh

To train a ConvNet feature extractor using SVHN data, run

python main.py --mode=train_feature_extractor

To train a generator of features that resemble the ones extracted through the pre-trained feature extractor, run

python main.py --mode=train_feature_generator

The resulting model (feature_generator) can be used to generate new features from the desired classes, by feeding it with noise vectors concatenated with one-hot label codes. To adapt the feature extractor trained on SVHN to MNIST data, run

python main.py --mode=train_DIFA

Default GPU index is 0. To use a different GPU, add --gpu=GPU_IDX when launching.

What to expect

In all our experiments, carried out on six different datasets, we could observe the same pattern while training the feature generator: the discriminator wins the minimax game for the first few thousand iterations, then the loss associated to the generator starts to decrease. In every experiment we ran, the minimax game converged to a very stable equilibrium, with the discriminator giving as outputs numbers very close to 0.5, independently by the inputs given (real/generated features).

plot

Discriminator and generator losses for Step 1

plot2

Discriminator and encoder losses for Step 2

acc

MNIST target accuracy for Step 2 (iterations x50)

Reference

Adversarial Feature Augmentation for Unsupervised Domain Adaptation
Riccardo Volpi, Pietro Morerio, Silvio Savarese and Vittorio Murino PDF

    @InProceedings{Volpi_2018_CVPR,
    author = {Volpi, Riccardo and Morerio, Pietro and Savarese, Silvio and Murino, Vittorio},
    title = {Adversarial Feature Augmentation for Unsupervised Domain Adaptation},
    booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2018}
    }

adversarial-feature-augmentation's People

Contributors

pmorerio avatar

Watchers

 avatar  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.