Giter VIP home page Giter VIP logo

vae-image-reconstruction's Introduction

VAE Image Reconstruction & Generation

Course project (optional task 1) of SJTU CS3612: Machine Learning, 2023 spring.

Attention: Discussion & reference welcomed, but NO PLAGIARISM !!!

Task objective

  • You should design and train a VAE on LFW dataset.
  • You should use Linear interpolation to generate images with specific properties. For example, given two output features of the encoder, i.e., $z_1$ and $z_2$ , the decoder takes $z_1$ as the input to generate a face image of a woman, and takes $z_2$ as the input to generate a face image of a man. You can use Linear interpolation to obtain a new feature $z = \alpha z_1 + (1 โˆ’ \alpha)z_2 ,\alpha \in (0,1)$. Then, the decoder takes ๐‘ง as the input to generate a new face image. You are required to do experiments with different values of ๐›ผ, e.g., ๐›ผ=0.2, 0.4, 0.6, 0.8, so as to obtain a set of face images. โ€ข You can conduct experiments on any two categories (e.g., male and female, old and young)

Designed network architecture

frame

Image reconstruction

left: original input / right: reconstructed output frame Pairwise comparison: frame

Face fusion

Random integration: frame Male and female: frame Old and young: frame

Run codes

  • Note that you may need to manually download the LFW dataset via this link, and place the unzipped folder under directory dataset.
  • To train with default settings, make sure to leave no less than 32 GB of memory.
  • Train model with tuned parameters
python train.py
  • Test image reconstruction and generation
python main.py
  • Generate the Old-Young fusion example
python example.py

For further information, refer to Section 2 of the project report here.

vae-image-reconstruction's People

Contributors

wzever avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.