{"id":25714040,"url":"https://github.com/wtupc96/copy-pasting-gan","last_synced_at":"2025-05-01T08:43:53.543Z","repository":{"id":279377657,"uuid":"198742881","full_name":"wtupc96/Copy-Pasting-GAN","owner":"wtupc96","description":"Object Discovery with a Copy-Pasting GAN","archived":false,"fork":false,"pushed_at":"2019-12-28T07:10:39.000Z","size":238,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-25T09:24:00.755Z","etag":null,"topics":["copy-paste","gan","image-processing","mask","tensorflow"],"latest_commit_sha":null,"homepage":null,"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/wtupc96.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-25T02:34:43.000Z","updated_at":"2021-06-29T18:19:30.000Z","dependencies_parsed_at":"2025-02-25T09:34:49.683Z","dependency_job_id":null,"html_url":"https://github.com/wtupc96/Copy-Pasting-GAN","commit_stats":null,"previous_names":["wtupc96/copy-pasting-gan"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtupc96%2FCopy-Pasting-GAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtupc96%2FCopy-Pasting-GAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtupc96%2FCopy-Pasting-GAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtupc96%2FCopy-Pasting-GAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wtupc96","download_url":"https://codeload.github.com/wtupc96/Copy-Pasting-GAN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240666188,"owners_count":19837854,"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":["copy-paste","gan","image-processing","mask","tensorflow"],"created_at":"2025-02-25T12:27:55.156Z","updated_at":"2025-02-25T12:27:55.932Z","avatar_url":"https://github.com/wtupc96.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Copy-Pasting GAN\nA TensorFlow implementation of paper **Object Discovery with a Copy-Pasting GAN**.\n\n## Requirements\n- Python 3.7\n- TensorFlow 1.13.1\n\n## Run\n1. Prepare dataset\n   1. Prepare foreground and background images(`jpg` format only);\n   2. Put foreground images into `data/plane_sky/plane`;\n   3. Put background images into `data/plane_sky/sky`;\n   4. Resize foreground and background images to $240\\times240$;(You can use `img_utils.py` in `utils` folder);\n\n   - You can change image format in `train.py` and `utils/img_utils.py`;\n   - You can change image folder in `cfgs.py`;\n2. Train with `python main.py`.\n3. You can find checkpoints and saved images in `logs`. :)\n\n## Results\n| ![foreground](imgs/foreground_img_0.jpg) | ![background](imgs/background_img_0.jpg) | ![shuffled_foreground](imgs/shuffled_foreground_img_0.jpg) |\n| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |\n|                          Foreground                          |                          Background                          |                  Random selected foreground                  |\n| ![foreground](imgs/random_mask_img_0.jpg) | ![background](imgs/grounded_fake_img_0.jpg) | ![shuffled_foreground](imgs/d_mask_grounded_fake_img_0.jpg) |\n|                    Random generated Mask                     |             Grounded Fake\u003cbr\u003e(with random mask)              |         Predicted mask from D\u003cbr\u003e(for Grounded Fake)         |\n| ![foreground](imgs/g_mask_foreground_img_0.jpg) | ![background](imgs/anti_shortcut_img_0.jpg) | ![shuffled_foreground](imgs/d_mask_anti_shortcut_img_0.jpg) |\n|          Predicted mask from G\u003cbr\u003e(for Foreground)           |       Anti-shortcut\u003cbr\u003e(foreground+random foreground)        |         Predicted mask from D\u003cbr\u003e(for Anti-shortcut)         |\n| ![foreground](imgs/d_mask_foreground_img_0.jpg) | ![background](imgs/composited_img_0.jpg) | ![shuffled_foreground](imgs/d_mask_composite_img_0.jpg) |\n|          Predicted mask from D\u003cbr\u003e(for Foreground)           |       **Composited image**\u003cbr\u003e(foreground+background)        |       Predicted mask from D\u003cbr\u003e(for Composited image)        |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtupc96%2Fcopy-pasting-gan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtupc96%2Fcopy-pasting-gan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtupc96%2Fcopy-pasting-gan/lists"}