{"id":19572136,"url":"https://github.com/advimman/cips","last_synced_at":"2025-06-16T04:33:34.193Z","repository":{"id":41458775,"uuid":"340331149","full_name":"advimman/CIPS","owner":"advimman","description":"Official repository for the paper \"Image Generators with Conditionally-Independent Pixel Synthesis\" (CVPR2021, Oral)","archived":false,"fork":false,"pushed_at":"2021-02-19T10:14:33.000Z","size":2430,"stargazers_count":208,"open_issues_count":13,"forks_count":36,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-04T21:11:13.675Z","etag":null,"topics":["deep-learning","foveated-rendering","gan","generative-adversarial-network","implicit-functions"],"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/advimman.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}},"created_at":"2021-02-19T10:13:09.000Z","updated_at":"2025-03-30T12:19:11.000Z","dependencies_parsed_at":"2022-09-08T01:22:51.690Z","dependency_job_id":null,"html_url":"https://github.com/advimman/CIPS","commit_stats":null,"previous_names":["saic-mdal/cips"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advimman%2FCIPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advimman%2FCIPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advimman%2FCIPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advimman%2FCIPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/advimman","download_url":"https://codeload.github.com/advimman/CIPS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251085145,"owners_count":21533821,"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":["deep-learning","foveated-rendering","gan","generative-adversarial-network","implicit-functions"],"created_at":"2024-11-11T06:23:59.669Z","updated_at":"2025-04-27T03:32:51.030Z","avatar_url":"https://github.com/advimman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CIPS -- Official Pytorch Implementation \r\n\r\nof the paper [Image Generators with Conditionally-Independent Pixel Synthesis](https://arxiv.org/abs/2011.13775)\r\n\r\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/image-generators-with-conditionally/image-generation-on-lsun-churches-256-x-256)](https://paperswithcode.com/sota/image-generation-on-lsun-churches-256-x-256?p=image-generators-with-conditionally)\r\n\r\n![Teaser](doc/teaser_img.jpg)\r\n\r\n## Requirements\r\n\r\npip install -r requirements.txt\r\n\r\n## Usage\r\n\r\nFirst create lmdb datasets:\r\n\r\n\u003e python prepare_data.py images --out LMDB_PATH --n_worker N_WORKER --size SIZE1,SIZE2,SIZE3,... DATASET_PATH\r\n\r\nThis will convert images to jpeg and pre-resizes it. \r\n\r\nTo train on FFHQ-256 or churches please run:\r\n\r\n\u003e python3 -m torch.distributed.launch --nproc_per_node=8 --master_port=1234 train.py --n_sample=8 --batch=4 --fid_batch=8 --Generator=CIPSskip --output_dir=skip-[ffhq/churches] --img2dis --num_workers=16 DATASET_PATH\r\n\r\nTo train on patches add --crop=PATCH_SIZE. PATCH_SIZE has to be a power of 2.\r\n\r\n## Pretrained Checkpoints\r\n\r\n[churches](https://drive.google.com/file/d/1lznTa52o2ZD7uKXkyZoUbL9wd8fj14wB/view?usp=sharing)\r\n\r\n[ffhq256](https://drive.google.com/file/d/1JRd4ZpMDmlkbNlxnVvZx77Eyfac53KSq/view?usp=sharing)\r\n\r\n[ffhq1024](https://drive.google.com/file/d/1vq4drXXnj_IDcYQGq_rrHIItiLXN0iOo/view?usp=sharing)\r\n\r\n[landscapes](https://drive.google.com/file/d/1oCJAnL4A4GWYoIYSZVLVg2UQbRmeqdqV/view?usp=sharing)\r\n\r\n### Generate samples\r\n\r\nTo play with the models please download checkpoints and check out a notebook.ipynb \r\n\r\n### Progressive training\r\n\r\nWe also tried to train  progressively on FFHQ starting from 256×256 initialization and got FID 10.07. We will update the paper with the training details soon. Checkpoint name is ffhq1024.pt. Samples are below.\r\n\r\n![Sample from FFHQ trained progressively](doc/ffhq_1024_compressed.jpg)\r\n\r\n## Citation\r\nIf you found our work useful, please don't forget to cite\r\n```\r\n@article{anokhin2020image,\r\n  title={Image Generators with Conditionally-Independent Pixel Synthesis},\r\n  author={Anokhin, Ivan and Demochkin, Kirill and Khakhulin, Taras and Sterkin, Gleb and Lempitsky, Victor and Korzhenkov, Denis},\r\n  journal={arXiv preprint arXiv:2011.13775},\r\n  year={2020}\r\n}\r\n```\r\n\r\nThe code is heavely based on the [styleganv2 pytorch implementation](https://github.com/rosinality/stylegan2-pytorch)\r\n\r\nNvidia-licensed CUDA kernels (fused_bias_act_kernel.cu, upfirdn2d_kernel.cu) is for non-commercial use only.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvimman%2Fcips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadvimman%2Fcips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvimman%2Fcips/lists"}