{"id":19603908,"url":"https://github.com/divelab/msvae","last_synced_at":"2025-04-27T19:32:28.060Z","repository":{"id":107289763,"uuid":"139473190","full_name":"divelab/msvae","owner":"divelab","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-23T19:01:43.000Z","size":996,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T02:21:49.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/divelab.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":"2018-07-02T17:24:45.000Z","updated_at":"2024-05-22T20:09:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1fe0061-fd82-46b7-a150-1fa1db0bf8ea","html_url":"https://github.com/divelab/msvae","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fmsvae","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fmsvae/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fmsvae/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divelab%2Fmsvae/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divelab","download_url":"https://codeload.github.com/divelab/msvae/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251195923,"owners_count":21550870,"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":[],"created_at":"2024-11-11T09:33:38.892Z","updated_at":"2025-04-27T19:32:28.054Z","avatar_url":"https://github.com/divelab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Stage Variational Auto-Encoders for Coarse-to-Fine Image Generation\n\n## Introduction\n\nMulti-Stage Variational Auto-Encoders for Coarse-to-Fine Image Generation (MSVAE) is a way to generate high quality images. \n\nDetailed information about MSVAE is provided in [arXiv tech report] (https://arxiv.org/pdf/1705.07202.pdf).\n\n\n## Citation\n\nIf using this code, please cite our paper.\n\n```\n@article{cai2017multi,\n  title={Multi-stage variational auto-encoders for coarse-to-fine image generation},\n  author={Cai, Lei and Gao, Hongyang and Ji, Shuiwang},\n  journal={arXiv preprint arXiv:1705.07202},\n  year={2017}\n}\n```\n\n## Results\n\n![model](./intro_res.png)\n\nComparison of reconstructed images from the CelebA dataset. The first row is the input\nimages in the CelebA training set. The second row is the reconstructed images generated by the\noriginal VAE. The third and fourth rows are the results of deep residual VAE and multi-stage VAE,\nrespectively.\n\n## System requirement\n\n#### Programming language\nPython\n\n#### Python Packages\ntensorflow (CPU) or tensorflow-gpu (GPU), numpy, h5py, progressbar, PIL, scipy\n\n## Prepare data\n\nWe use celebA dataset in this work. CelebA is a large scale face dataset that contains 202599 face images. The size of each face\nimage is 178×218.  We resize the images to 128×128. Please save the dataset into h5 data format.\n\n## Configure the network\n\nAll network hyperparameters are configured in main.py.\n\n#### Training\n\nmax_step: how many iterations or steps to train\n\ntest_step: how many steps to perform a mini test or validation\n\nsave_step: how many steps to save the model\n\nsummary_step: how many steps to save the summary\n\n#### Data\n\ndata_dir: data directory\n\ntrain_data: h5 file for training\n\nvalid_data: h5 file for validation\n\ntest_data: h5 file for testing\n\nbatch: batch size\n\nchannel: input image channel number\n\nheight, width: height and width of input image\n\n#### Debug\n\nlogdir: where to store log\n\nmodeldir: where to store saved models\n\nsampledir: where to store predicted samples, please add a / at the end for convinience\n\nmodel_name: the name prefix of saved models\n\nreload_step: where to return training\n\ntest_step: which step to test or predict\n\nrandom_seed: random seed for tensorflow\n\n#### Network architecture\n\nnetwork_depth: how deep of the U-Net including the bottom layer\n\nstart_channel_num: the number of channel for the first conv layer\n\nsigma: sigma value for reconstruction loss\n\n## Training and Testing\n\n#### Start training\n\nAfter configure the network, we can start to train. Run\n```\npython main.py\n```\nThe training of MSVAE will start.\n\n#### Testing\n\nRun\n```\npython main.py --action=predict\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivelab%2Fmsvae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivelab%2Fmsvae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivelab%2Fmsvae/lists"}