{"id":13737493,"url":"https://github.com/sangwoomo/FreezeD","last_synced_at":"2025-05-08T14:31:45.363Z","repository":{"id":45476418,"uuid":"243036280","full_name":"sangwoomo/FreezeD","owner":"sangwoomo","description":"Freeze the Discriminator: a Simple Baseline for Fine-Tuning GANs (CVPRW 2020)","archived":false,"fork":false,"pushed_at":"2021-12-12T03:36:00.000Z","size":44917,"stargazers_count":286,"open_issues_count":4,"forks_count":37,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-15T05:32:47.514Z","etag":null,"topics":["gan","generative-adversarial-network","generative-models","transfer-learning"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2002.10964","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/sangwoomo.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}},"created_at":"2020-02-25T15:37:46.000Z","updated_at":"2024-10-22T12:05:03.000Z","dependencies_parsed_at":"2022-07-18T22:58:53.351Z","dependency_job_id":null,"html_url":"https://github.com/sangwoomo/FreezeD","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/sangwoomo%2FFreezeD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangwoomo%2FFreezeD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangwoomo%2FFreezeD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangwoomo%2FFreezeD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sangwoomo","download_url":"https://codeload.github.com/sangwoomo/FreezeD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253085521,"owners_count":21851641,"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","generative-adversarial-network","generative-models","transfer-learning"],"created_at":"2024-08-03T03:01:50.226Z","updated_at":"2025-05-08T14:31:45.356Z","avatar_url":"https://github.com/sangwoomo.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# FreezeD: a Simple Baseline for Fine-tuning GANs\n\n**Update (2020/10/28)**\n\nRelease [checkpoints](https://drive.google.com/drive/folders/140y2e80koKA_URy6cNChpK4LKqGjWnv0) of StyleGAN fine-tuned on cat and dog datasets.\n\n**Update (2020/04/06)**\n\nCurrent code evaluates FID scores with `inception.train()` mode. Fixing it to `inception.eval()` may degrade the overall scores (both competitors and ours; hence the trend does not change). Thanks to @jychoi118 ([Issue #3](https://github.com/sangwoomo/FreezeD/issues/3)) for reporting this.\n\n---\n\nOfficial code for [\"**Freeze the Discriminator: a Simple Baseline for Fine-Tuning GANs**\"](https://arxiv.org/abs/2002.10964) (CVPRW 2020).\n\nThe code is heavily based on the [StyleGAN-pytorch](https://github.com/rosinality/style-based-gan-pytorch) and [SNGAN-projection-chainer](https://github.com/pfnet-research/sngan_projection) codes.\n\nSee `stylegan` and `projection` directory for StyleGAN and SNGAN-projection experiments, respectively.\n\n**Note:** There is a bug in PyTorch 1.4.0, hence one should use `torch\u003e=1.5.0` or `torch\u003c=1.3.0`. See Issue [#1](https://github.com/sangwoomo/FreezeD/issues/1).\n\n## Generated samples\n\nGenerated samples over fine-tuning FFHQ-pretrained StyleGAN\n\n\u003cimg src=\"./resources/cat_trend.gif\" width=\"384\"\u003e \u0026nbsp; \u003cimg src=\"./resources/dog_trend.gif\" width=\"384\"\u003e\n\n\n### More generated samples (StyleGAN)\n\nGenerated samples under [Animal Face](https://vcla.stat.ucla.edu/people/zhangzhang-si/HiT/exp5.html) and [Anime Face](http://www.nurs.or.jp/~nagadomi/animeface-character-dataset/) datasets\n\n\u003cimg src=\"./resources/stylegan/original.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/bear.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/cat.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/chicken.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/cow.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/deer.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/dog.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/duck.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/eagle.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/elephant.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/human.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/lion.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/monkey.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/mouse.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/panda.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/pigeon.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/pig.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/rabbit.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/sheep.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/tiger.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/wolf.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/miku.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/sakura.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/haruhi.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/fate.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/nanoha.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/lelouch.png\" width=\"256\"\u003e\n\n\u003cimg src=\"./resources/stylegan/mio.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/yuki.png\" width=\"256\"\u003e \u0026nbsp; \u003cimg src=\"./resources/stylegan/shana.png\" width=\"256\"\u003e\n\n\n### More generated samples (SNGAN-projection)\n\nComparison of fine-tuning (left) and freeze D (right) under [Oxford Flower](https://www.robots.ox.ac.uk/~vgg/data/flowers/102/index.html), [CUB-200-2011](http://www.vision.caltech.edu/visipedia/CUB-200-2011.html), and [Caltech-256](http://www.vision.caltech.edu/Image_Datasets/Caltech256/) datasets\n\nFreeze D generates more class-consistent results (see row 2, 8 of Oxford Flower)\n\n\u003cimg src=\"./resources/projection/flower_base.png\" width=\"384\"\u003e \u0026nbsp; \u003cimg src=\"./resources/projection/flower_freeze.png\" width=\"384\"\u003e\n\n\u003cimg src=\"./resources/projection/cub_base.png\" width=\"384\"\u003e \u0026nbsp; \u003cimg src=\"./resources/projection/cub_freeze.png\" width=\"384\"\u003e\n\n\u003cimg src=\"./resources/projection/caltech_base.png\" width=\"384\"\u003e \u0026nbsp; \u003cimg src=\"./resources/projection/caltech_freeze.png\" width=\"384\"\u003e\n\n\n## Citation\nIf you use this code for your research, please cite our papers.\n```\n@inproceedings{\n    mo2020freeze,\n    title={Freeze the Discriminator: a Simple Baseline for Fine-Tuning GANs},\n    author={Mo, Sangwoo and Cho, Minsu and Shin, Jinwoo},\n    booktitle = {CVPR AI for Content Creation Workshop},\n    year={2020},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangwoomo%2FFreezeD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsangwoomo%2FFreezeD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangwoomo%2FFreezeD/lists"}