{"id":23683843,"url":"https://github.com/drawcodeboy/vae","last_synced_at":"2026-03-17T17:11:43.815Z","repository":{"id":270073873,"uuid":"909261974","full_name":"drawcodeboy/VAE","owner":"drawcodeboy","description":"Variational Autoencoder (VAE), Evidence Lower Bound (ELBO) Implementation (PyTorch)","archived":false,"fork":false,"pushed_at":"2025-03-17T12:03:55.000Z","size":559,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T02:51:37.121Z","etag":null,"topics":["elbo","implementation","pytorch","vae"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drawcodeboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-28T07:03:48.000Z","updated_at":"2025-03-17T12:12:43.000Z","dependencies_parsed_at":"2025-03-15T15:35:32.961Z","dependency_job_id":null,"html_url":"https://github.com/drawcodeboy/VAE","commit_stats":null,"previous_names":["drawcodeboy/vae-implementation","drawcodeboy/vae"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawcodeboy%2FVAE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawcodeboy%2FVAE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawcodeboy%2FVAE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawcodeboy%2FVAE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drawcodeboy","download_url":"https://codeload.github.com/drawcodeboy/VAE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345289,"owners_count":21088243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elbo","implementation","pytorch","vae"],"created_at":"2024-12-29T20:21:35.860Z","updated_at":"2026-03-17T17:11:43.776Z","avatar_url":"https://github.com/drawcodeboy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VAE Implementation with PyTorch\r\n\r\n## Description\r\n* This is Variational Autoencoder(VAE) Implementation with PyTorch!\r\n\r\n## Preview: CelebA\r\n### (1) Reconstruction\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"./assets/test_recon_CelebA_1.jpg\" width=\"50%\" height=\"50%\"\u003e\r\n\u003c/p\u003e\r\n\r\n### (2) Generation\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_CelebA_1.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_CelebA_2.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_CelebA_3.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_CelebA_4.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n\u003c/p\u003e\r\n\r\n## Preview: MNIST\r\n### (1) Reconstruction\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"./assets/test_recon_MNIST_1.jpg\" width=\"50%\" height=\"50%\"\u003e\r\n\u003c/p\u003e\r\n\r\n### (2) Generation\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_MNIST_1.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_MNIST_2.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_MNIST_3.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n    \u003cimg src=\"./assets/test_gen_MNIST_4.jpg\" width=\"20%\" height=\"20%\"\u003e\r\n\u003c/p\u003e\r\n\r\n### (3) Latent Space t-SNE\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"./assets/t-SNE_MNIST.jpg\" width=\"60%\" height=\"60%\"\u003e\r\n\u003c/p\u003e\r\n\r\n## Installation\r\n```\r\n# Docker (Optional)\r\ndocker pull ubuntu:22.04\r\ndocker run -itd --gpus=all --shm-size=16G --name=vae ubuntu:22.04 /bin/bash\r\n\r\napt-get update\r\napt-get install sudo\r\nsudo apt-get install git\r\nsudo apt-get install gdown # For CelebA Dataset\r\nsudo apt-get install unzip\r\nsudo apt-get install -y libgl1-mesa-glx # OpenCV\r\nsudo apt-get install -y libglib2.0-0 # OpenCV\r\n\r\n# Download\r\ngit clone https://github.com/drawcodeboy/VAE.git\r\ncd VAE\r\n\r\n# Download CelebA\r\ngdown --id 1m8-EBPgi5MRubrm6iQjafK2QMHDBMSfJ --output data/\r\nunzip data/celeba.zip -d data/\r\nunzip data/celeba/img_align_celeba.zip -d data/celeba/\r\n\r\n# Install Python\r\nsudo apt-get install python3\r\nsudo apt-get install python3-venv\r\n\r\n# Virtual Environment\r\npython3 venv -m .venv\r\nsource .venv/bin/activate\r\n\r\n# Install packages\r\npip install -r requirements.txt\r\n\r\n# train MNIST\r\npython train.py --config=vae.mnist\r\n\r\n# train CelebA\r\npython train.py --config=vae.celeba\r\n\r\n# test MNIST\r\npython test.py --config=vae.mnist\r\n\r\n# test CelebA\r\npython test.py --config=vae.celeba\r\n```\r\n\r\n## References\r\n1. \u003ci\u003e\u003cb\u003eVAE\u003c/b\u003e\u003c/i\u003e: \u003ca href=\"https://arxiv.org/pdf/1312.6114\"\u003eKingma, D. P. (2013). Auto-encoding variational bayes. \u003ci\u003earXiv preprint arXiv:1312.6114.\u003c/i\u003e\u003c/a\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrawcodeboy%2Fvae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrawcodeboy%2Fvae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrawcodeboy%2Fvae/lists"}