Giter Club home page Giter Club logo

msp's Introduction

MSP

This code corresponding to the paper: Latent Space Factorisation and Manipulation via Matrix Subspace Projection (ICML2020).

The main website is here https://xiao.ac/proj/msp.

This code is based on

python 3.7
pytorch (version >= 1.4.0)
torchvision (version >= 0.4.1)

Step 1: Preparing CelebA Dataset

To train and test the model, you should download the CelebA dataset (from http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html).

You only need to put the two file: img_align_celeba.zip and list_attr_celeba.txt in the folder ./CelebA_Dataset/ .

Step 2: Training

Please run train_CelebA.py to train the model like:

> python3 train_CelebA.py

You can use the parameter -pg to show the training progress.

> python3 train_CelebA.py -pg

The trained model will be saved in ./model_save/ .

Alternatively, you can download the pre-trained model (from https://s3.eu-west-2.amazonaws.com/nn.models/MSP_CelebA.tch), and put the file MSP_CelebA.tch in ./model_save/ .

Step 3: Testing

The file testing_CelebA.py can be used to generate the example pictures (including the picture used in the ICML paper).

> python3 testing_CelebA.py

The generated pictures will be in ./Outputs/ .

Textural Experiments (TBD)

The code for the text experiment is being collated and will be released soon.

Paper and Citation

This work has been published in ICML2020. Here is the paper of the near camera-ready version. If you find MSP interesting, please consider citing:

  @incollection{icml2020_1832, author = {Li, Xiao and Lin, Chenghua and Li, Ruizhe and Wang, Chaozheng and Guerin, Frank}, booktitle = {Proceedings of Machine Learning and Systems 2020}, pages = {3211--3221}, title = {Latent Space Factorisation and Manipulation via Matrix Subspace Projection}, year = {2020} }  

Acknowledgement

This work is supported by the award made by the UK Engineering and Physical SciencesResearch Council (Grant number: EP/P011829/1).

msp's People

Contributors

lissomx avatar

Stargazers

Francisco Caetano avatar Jiawei Wu avatar uco_physics avatar Ivan Pereira avatar Harish Babu Manogaran avatar Zhihui Xie avatar Chenghua Lin avatar  avatar  avatar Nathan avatar Wataoka Koki avatar Ruizhe Li avatar

Watchers

 avatar paper2code - bot avatar

msp's Issues

Adding a open-source license

Hi,

Congratulations on this amazing work! I wanted to ask if you could add a license for code usage? It would make it easier to build on top of this codebase. I think the MIT license is the most popular one in research repositories currently.

Cheers,
Maciej

Pretrained models

Hi, @lissomx

I am curious to check out the result. Could you please share the pretrained models, if possible?

Thanks,
Vladyslav

Train/inference implementation

Hi,
I was looking into your code and have a few concerns:

  1. In which format do you use labels while training? Given the code in your Dataset - it is a one-hot vector with -1 instead of 0s? Is there some justification for this or it is possible to use traditional encoding?

  2. I am also struggling to understand your predict function and how it aligns with the method described in the paper(Section 3.4).

    def predict(self, x, new_ls=None, weight=1.0):

I will be pleased if you make things more clear for me.
Thanks in advance.
Vladyslav

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.