Skip to content

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

Notifications You must be signed in to change notification settings

wzever/VAE-image-reconstruction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages