{"id":13719309,"url":"https://github.com/ArkaJU/Image-Colorization-CycleGAN","last_synced_at":"2025-05-07T11:31:28.828Z","repository":{"id":97446224,"uuid":"153828570","full_name":"ArkaJU/Image-Colorization-CycleGAN","owner":"ArkaJU","description":"Colorization of grayscale images using CycleGAN in TensorFlow.","archived":false,"fork":false,"pushed_at":"2021-05-30T09:51:42.000Z","size":2840,"stargazers_count":19,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T08:35:52.639Z","etag":null,"topics":["computer-vision","cyclegan","deep-learning","generative-adversarial-network","image-colorization"],"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/ArkaJU.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":"2018-10-19T18:57:05.000Z","updated_at":"2024-09-09T17:43:35.000Z","dependencies_parsed_at":"2023-04-03T19:02:06.022Z","dependency_job_id":null,"html_url":"https://github.com/ArkaJU/Image-Colorization-CycleGAN","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/ArkaJU%2FImage-Colorization-CycleGAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkaJU%2FImage-Colorization-CycleGAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkaJU%2FImage-Colorization-CycleGAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArkaJU%2FImage-Colorization-CycleGAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArkaJU","download_url":"https://codeload.github.com/ArkaJU/Image-Colorization-CycleGAN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252868846,"owners_count":21816925,"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":["computer-vision","cyclegan","deep-learning","generative-adversarial-network","image-colorization"],"created_at":"2024-08-03T01:00:46.214Z","updated_at":"2025-05-07T11:31:28.399Z","avatar_url":"https://github.com/ArkaJU.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image-colorization-using-CycleGAN\n\n# Introduction\n\nAutomatic image colorization has been a popular image-to-image translation problem of significant interest for several practical application areas including restoration of aged or degraded images. This project attempts to utilize CycleGANs to colorize grayscale images back to their colorful RGB form.\n\n# Overview\n\nImage-to-image  translation  is  a  class  of  vision  and graphics problems where the goal is to learn the mapping\nbetween an input image and an output image using a training set of aligned image pairs. But for many tasks, paired training data may not be available like this problem of image colorization. This is where the power of CycleGAN becomes apparent. Superiority of CycleGAN has been demonstrated on several tasks where paired training data hardly exist, e.g., in object transfiguration and painting style and season transfer\n\n# Model\n\nGenerative Adversarial Networks(GANs) are composed of two models:\n1. Generator: Aims to generate new data similar to the expected one. The Generator could be related to a human art forger, which creates fake works of art.\n2. Discriminator: It's goal is to recognize if an input data is ‘real’ — belongs to the original dataset — or if it is ‘fake’ — generated by a forger. In this scenario, a Discriminator is analogous to  an art expert, who tries to detect artworks as truthful or fraud.\n\nThe CycleGAN consists of 2 generators and discriminators. One generator maps from domain A to B and the other one, from B to A.\nThey compete with their corresponding adversarial discriminators.\n\n\nTo regularize the model, the authors introduce the constraint of cycle-consistency - if we transform from source distribution to target and then back again to source distribution, we should get samples from our source distribution.\n\n![](images/CycleLoss.png)\n\n# Data\n\nThe experiment was done on 2 datasets: \n1. Grayscale of flowers(domain A) and their RGB version(domain B): 2K images in each folder.\n2. Frames extracted from old B\u0026W movies(domain A) and new movies (domain B): 24K images in each folder.\n\nThe second problem is a very interesting one as the frames are taken from very old movies(1950s and before) and there is no scope for paired data, making this a useful application for CycleGAN.\n\n# Training\n\nThe models were trained on a GPU. It took about 15 hours for the first model to train. The 2nd model took a bit longer to achieve decent results, after training about 20 hours. Sample results were frequently monitored through TensorBoard.\n\n# Results\n\nThe first model yielded fine results. Some of the best ones are shown below:\n![](images/results/1.PNG)\n![](images/results/2.PNG)\n\n\nFor the second model the results were also good, some of which are shown below:\n![](images/results/3.PNG)\n![](images/results/4.PNG)\n\n\n# References\n- Original Paper: [Arxiv](https://arxiv.org/abs/1703.10593)\n- Base project [Github](https://github.com/xhujoy/CycleGAN-tensorflow)\n- Dataset: https://drive.google.com/file/d/1-3DKl_h5NkJWyXib-AVf4ioPY236lsgM/view?usp=sharing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArkaJU%2FImage-Colorization-CycleGAN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FArkaJU%2FImage-Colorization-CycleGAN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FArkaJU%2FImage-Colorization-CycleGAN/lists"}