In this assignment, you will train a Beta-VAE (BVAE) on the CelebA dataset using the codebase provided in the PyTorch-VAE repository. You will set up the environment, prepare the dataset, modify the necessary configurations, run the training process, and analyze the results. Your work will be documented and submitted in a single Jupyter notebook.
- Basic knowledge of Python and PyTorch.
- Understanding of Variational Autoencoders (VAEs) and Beta-VAEs.
- Familiarity with Jupyter notebooks and working in a command-line environment.
The code you will use is located in the PyTorch-VAE repository. Specifically, you will work with the Beta-VAE implementation in models/beta_vae.py
.
Start by cloning the repository to your local machine:
git clone https://github.com/AntixK/PyTorch-VAE.git
cd PyTorch-VAE
Download the CelebA dataset from the official website. Extract the dataset and place it in a directory, noting the path.
Create a new Jupyter notebook in the root directory of the cloned repository.
In your Jupyter notebook, document your entire workflow:
- Introduction: Briefly explain the goal of the assignment and the concept of Beta-VAE.
- Data Preparation: Show how you downloaded and prepared the CelebA dataset.
- Training: Include the code to train the Beta-VAE model. Use the
main.py
script provided in the repository. - Results Analysis: Visualize the reconstructed images, latent space traversals, and loss curves. Discuss your findings.
- Experimentation: Experiment with different beta values and analyze their impact on the results.
After training completes, analyze the results:
- Visualize the reconstructed images and latent space representations.
- Evaluate the model performance using reconstruction loss and KLD loss.
- Experiment with different values of beta to observe its effect on the disentanglement of learned features.
Summarize your findings and insights gained from the experiment. Include any challenges you faced and how you overcame them.
Submit the Jupyter notebook (.ipynb file) that contains all the above sections.
- Ensure you follow best practices for coding and experimentation.
- Your notebook should be well-documented and easy to follow.
- Include visualizations and analyses that clearly demonstrate your understanding of Beta-VAE and the CelebA dataset.
Good luck with your assignment!