{"id":13612669,"url":"https://github.com/YOUSIKI/TensorLayer-BiGAN","last_synced_at":"2025-04-13T12:32:31.775Z","repository":{"id":132120211,"uuid":"215420298","full_name":"yousiki/TensorLayer-BiGAN","owner":"yousiki","description":"A TensorLayer implementation of BiGAN (Adversarial Feature Learning).","archived":false,"fork":false,"pushed_at":"2020-09-14T16:01:28.000Z","size":15911,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"celeba","last_synced_at":"2025-04-10T05:05:27.215Z","etag":null,"topics":["gan","tensorflow","tensorlayer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yousiki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-16T00:16:50.000Z","updated_at":"2022-06-19T13:06:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"92cf755b-ecad-462a-9971-3c47b02741ec","html_url":"https://github.com/yousiki/TensorLayer-BiGAN","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousiki%2FTensorLayer-BiGAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousiki%2FTensorLayer-BiGAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousiki%2FTensorLayer-BiGAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousiki%2FTensorLayer-BiGAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yousiki","download_url":"https://codeload.github.com/yousiki/TensorLayer-BiGAN/tar.gz/refs/heads/celeba","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248714690,"owners_count":21149940,"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":["gan","tensorflow","tensorlayer"],"created_at":"2024-08-01T20:00:32.992Z","updated_at":"2025-04-13T12:32:29.442Z","avatar_url":"https://github.com/yousiki.png","language":"Python","readme":"# TensorLayer-BiGAN\n\n\nA TensorLayer implementation of [Adversarial Feature Learning](https://arxiv.org/abs/1605.09782), which is also known as BiGAN. \n\n![model-structure](images/model-structure.png)\n\n\n\n## Prerequisites\n\n- Python 3.7\n- TensorFlow 2.0.0\n- TensorLayer 2.1.1\n\nWe highly recommend you to install the packages above using Anaconda (or Miniconda).\n\n### Install TensorFlow with GPU support\n\n``` bash\nconda create -n bigan python=3.7 tensorflow-gpu\n```\n\n### Install TensorFlow with only CPU support\n\n``` bash\nconda create -n bigan python=3.7 tensorflow\n```\n\n### Install TensorLayer\n\n```bash\nconda activate bigan \u0026\u0026 pip install tensorlayer\n```\n\n\n\n## Usage\n\n### Evaluation\n\nFirst, download the pre-trained weights from [here](https://github.com/YOUSIKI/TensorLayer-BiGAN/releases).\n\nSecond, use the follow script to generate an images.\n\n``` bash\npython eval.py\n```\n\nThis will ganerate 8x8 fake human faces and save the image to `samples.png`. For further evaluation usage, please read the code in `eval.py` and modify it as you like.\n\n### Training\n\nClone this repository to your computer.\n\n``` bash\ngit clone https://github.com/YOUSIKI/BiGAN.TensorLayer.git\n```\n\nTo train a BiGAN network from nothing, please download CelebA Dataset from eigher [Google Drive](https://drive.google.com/open?id=0B7EVK8r0v71pWEZsZE9oNnFzTm8) or [Baidu Netdisk](https://pan.baidu.com/s/1eSNpdRG#list/path=%2F). \n\n*Here, I recommend you to download only  `Img/img_align_celeba.zip` to save some time. Moreover, you may look for this dataset on other unofficial sites such as [BYR](https://bt.byr.cn/).*\n\nAfter downloading the zip file, extract it to a fold such as `data` under the project directory. You can also extract it to other directories you like, but remember to modify `DATA_PATH` in `data.py` if you do so.\n\nNext, use the follow script to train.\n\n``` bash\npython train.py\n```\n\nThe training configurations can be found and modified in `config.py`.\n\nIf you want to train the network on your own dataset, please view every `.py` file and change them as your will.\n\n\n\n## Result on CelebA\n\n![result](images/samples.png)\n\nFor more sample images saved during training, check `samples` folder.\n\n\n\n## More\n\nThis project is mostly based on [dcgan implementation of tensorlayer](https://github.com/tensorlayer/dcgan), you may find this repository useful while reviewing the code. Many thanks to its contributors ([zsdonghao](https://github.com/zsdonghao) et al.)\n\nWe are just beginners of neural networks (and TensorLayer). There may be many mistakes in this project. Please contact us if you found. All issues and pull requests are welcomed.\n\n","funding_links":[],"categories":["4. GAN"],"sub_categories":["1.2 DatasetAPI and TFRecord Examples"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYOUSIKI%2FTensorLayer-BiGAN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYOUSIKI%2FTensorLayer-BiGAN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYOUSIKI%2FTensorLayer-BiGAN/lists"}