SlideShare a Scribd company logo
Image Colorization Using CycleGAN
Zahil Shanis Yash Saraf Sai Varun
Generative Adversarial Networks
● Generative models with two competing differentiable functions, represented by
neural networks.
● Generator: Generates data from random noise using feedback from discriminator.
● Discriminator: A classifier to identify real data from fake (synthesized) data.
We train the generator to create data towards what the discriminator thinks is real.
CycleGAN
● Proposed by Jun-Yan Zhu, Taesung Park, Phillip Isola and Alexei A. Efros
● Performs unpaired image to image translation.
● Unpaired translation - doesn’t require a training set of aligned image pairs.
● Cycle GAN can translate an image from a source domain X to a target domain Y in the
absence of paired examples.
Cycle GAN Architecture
● Architecture consists of two mappings: G : X -> Y and F : Y -> X.
● A generator G is used to translate real image from domain X to domain Y.
● A generator F is used to translate real image from domain Y to domain X.
● Discriminators (Dx and Dy) are used to discriminate real and fake images at respective
domains.
Cycle GAN Cost Function
● In addition to the Generator and Discriminator losses, CycleGAN uses one more type of
loss called Cycle Consistency Loss.
● This enforces that the input and generated output are recognizably the same.
● Final Objective Function is given by:
Image Colorization with Cycle GAN
● Colorize gray scale images using Cycle GAN architecture.
● Training on unpaired flowers dataset - domain X as gray scale images and domain Y as
color images.
Network Architecture
● Generator: A UNet like architecture with an encoder, transformer and decoder.
● Discriminator: PatchGANS which look at a “patch” of the input image, and output the
probability of the patch being “real”.
● Trained with a batch size of 1 with Adam as the optimizer.
Image Colorization Results
Network Modifications
1) Cycle GAN with Stochastic Generators
● Inter domain mapping from unpaired data need not always be one-to-one or
deterministic.
● Stochastic Cycle GAN - Generates multiple color images for a single grayscale image.
● Can be achieved by modifying the generator GAB to take a vector of noise and a sample
from the source domain, and generates a non-deterministic sample in the target domain.
● With different noise z ~ p(z), model can generate different domain B mappings.
● Inspired from Conditional Instance Normalization for Style Transfer paper by Huang et al.
● We are working on implementing this.
Network Modifications
2) Cycle GAN with Capsule Nets
● In CNN, Pooling layers are used to increase
the field of view and predict higher order
features by combining values.
● Use of Capsule Nets helps preserve
hierarchical pose relationships between
object parts.
Network Modifications
● Capsule Networks and GANs - Using a
Capsule Network as a discriminator to
better train the model to understand
spatial differences.
● Papers CapsGAN, and CapsuleGAN, takes
forward the idea by replacing the DCGAN
discriminator with CapsuleGANs.
Conditional GAN (pix2pix)
● Performs paired image to image translation.
● In an unconditioned generative model, there is no control on modes of the data being
generated.
● In the CGAN, the generator learns to generate a fake sample with a specific condition or
characteristics rather than a generic sample from unknown noise distribution.
Conditional GAN (pix2pix)
Training a conditional GAN
Combined Loss Function
References
● Cycle GAN paper by Zhu et al - https://arxiv.org/pdf/1703.10593.pdf
● Blog Cycle GAN - https://medium.com/@jonathan_hui/gan-cyclegan-6a50e7600d7
● Cycle GAN implementation - https://github.com/eriklindernoren/Keras-GAN
● Keras documentation - https://keras.io/
● CapsuleGAN implementation - https://github.com/gusgad/capsule-GAN/blob/master/capsule_gan.ipynb
● CapsGAN - https://arxiv.org/abs/1806.03968
● CapsuleGAN - https://arxiv.org/abs/1802.06167
● Capsule Networks - https://arxiv.org/abs/1710.09829
● Blog Capsule Networks - https://medium.com/ai%C2%B3-theory-practice-business/understanding-hintons-capsule-networks-
part-i-intuition-b4b559d1159b
● Conditional Instance Normalization - https://arxiv.org/pdf/1703.06868.pdf
● Pix2pix implemntation - https://github.com/eriklindernoren/Keras-GAN/tree/master/pix2pix
● Pix2pix - https://arxiv.org/abs/1611.07004

More Related Content

What's hot

GANs Presentation.pptx
GANs Presentation.pptxGANs Presentation.pptx
GANs Presentation.pptx
MAHMOUD729246
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
Basit Rafiq
 
GAN - Theory and Applications
GAN - Theory and ApplicationsGAN - Theory and Applications
GAN - Theory and Applications
Emanuele Ghelfi
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical Imaging
Sanghoon Hong
 
3-d interpretation from single 2-d image for autonomous driving II
3-d interpretation from single 2-d image for autonomous driving II3-d interpretation from single 2-d image for autonomous driving II
3-d interpretation from single 2-d image for autonomous driving II
Yu Huang
 
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Amol Patil
 
Image colorization
Image colorizationImage colorization
Image colorization
Yash Saraf
 
Introduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable RenderingIntroduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable Rendering
Preferred Networks
 
Generative adversarial text to image synthesis
Generative adversarial text to image synthesisGenerative adversarial text to image synthesis
Generative adversarial text to image synthesis
Universitat Politècnica de Catalunya
 
Finding connections among images using CycleGAN
Finding connections among images using CycleGANFinding connections among images using CycleGAN
Finding connections among images using CycleGAN
NAVER Engineering
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational Autoencoder
Mark Chang
 
Deep learning for medical imaging
Deep learning for medical imagingDeep learning for medical imaging
Deep learning for medical imaging
geetachauhan
 
Unsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGANUnsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGAN
Shyam Krishna Khadka
 
Latent diffusions vs DALL-E v2
Latent diffusions vs DALL-E v2Latent diffusions vs DALL-E v2
Latent diffusions vs DALL-E v2
Vitaly Bondar
 
Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)
Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)
Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)
Universitat Politècnica de Catalunya
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural network
Ferdous ahmed
 
Autoencoders in Deep Learning
Autoencoders in Deep LearningAutoencoders in Deep Learning
Autoencoders in Deep Learning
milad abbasi
 
Cnn
CnnCnn
U-Net (1).pptx
U-Net (1).pptxU-Net (1).pptx
U-Net (1).pptx
Changjin Lee
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnn
SumeraHangi
 

What's hot (20)

GANs Presentation.pptx
GANs Presentation.pptxGANs Presentation.pptx
GANs Presentation.pptx
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
GAN - Theory and Applications
GAN - Theory and ApplicationsGAN - Theory and Applications
GAN - Theory and Applications
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical Imaging
 
3-d interpretation from single 2-d image for autonomous driving II
3-d interpretation from single 2-d image for autonomous driving II3-d interpretation from single 2-d image for autonomous driving II
3-d interpretation from single 2-d image for autonomous driving II
 
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
 
Image colorization
Image colorizationImage colorization
Image colorization
 
Introduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable RenderingIntroduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable Rendering
 
Generative adversarial text to image synthesis
Generative adversarial text to image synthesisGenerative adversarial text to image synthesis
Generative adversarial text to image synthesis
 
Finding connections among images using CycleGAN
Finding connections among images using CycleGANFinding connections among images using CycleGAN
Finding connections among images using CycleGAN
 
Variational Autoencoder
Variational AutoencoderVariational Autoencoder
Variational Autoencoder
 
Deep learning for medical imaging
Deep learning for medical imagingDeep learning for medical imaging
Deep learning for medical imaging
 
Unsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGANUnsupervised learning represenation with DCGAN
Unsupervised learning represenation with DCGAN
 
Latent diffusions vs DALL-E v2
Latent diffusions vs DALL-E v2Latent diffusions vs DALL-E v2
Latent diffusions vs DALL-E v2
 
Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)
Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)
Image-to-Image Translation with Conditional Adversarial Nets (UPC Reading Group)
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural network
 
Autoencoders in Deep Learning
Autoencoders in Deep LearningAutoencoders in Deep Learning
Autoencoders in Deep Learning
 
Cnn
CnnCnn
Cnn
 
U-Net (1).pptx
U-Net (1).pptxU-Net (1).pptx
U-Net (1).pptx
 
Image classification using cnn
Image classification using cnnImage classification using cnn
Image classification using cnn
 

Similar to Image colorization

Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...
Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...
Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...
Catalina Arango
 
Volodymyr Lyubinets “Generative models for images”
Volodymyr Lyubinets  “Generative models for images”Volodymyr Lyubinets  “Generative models for images”
Volodymyr Lyubinets “Generative models for images”
Lviv Startup Club
 
Decomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesisDecomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesis
Naeem Shehzad
 
Brain Tumour Detection.pptx
Brain Tumour Detection.pptxBrain Tumour Detection.pptx
Brain Tumour Detection.pptx
RevolverRaja2
 
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Universitat Politècnica de Catalunya
 
TransNeRF
TransNeRFTransNeRF
TransNeRF
NavneetPaul2
 
Domain adaptation for Image Segmentation
Domain adaptation for Image SegmentationDomain adaptation for Image Segmentation
Domain adaptation for Image Segmentation
Deepak Thukral
 
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Codemotion
 
Automatic Detection of Window Regions in Indoor Point Clouds Using R-CNN
Automatic Detection of Window Regions in Indoor Point Clouds Using R-CNNAutomatic Detection of Window Regions in Indoor Point Clouds Using R-CNN
Automatic Detection of Window Regions in Indoor Point Clouds Using R-CNNZihao(Gerald) Zhang
 
Deep Generative Modelling
Deep Generative ModellingDeep Generative Modelling
Deep Generative Modelling
Petko Nikolov
 
Generative adversarial network_Ayadi_Alaeddine
Generative adversarial network_Ayadi_AlaeddineGenerative adversarial network_Ayadi_Alaeddine
Generative adversarial network_Ayadi_Alaeddine
Deep Learning Italia
 
190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...
190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...
190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...
亮宏 藤井
 
Face-GAN project report.pptx
Face-GAN project report.pptxFace-GAN project report.pptx
Face-GAN project report.pptx
AndleebFatima16
 
Face-GAN project report
Face-GAN project reportFace-GAN project report
Face-GAN project report
AndleebFatima16
 
Generation of Deepfake images using GAN and Least squares GAN.ppt
Generation of Deepfake images using GAN and Least squares GAN.pptGeneration of Deepfake images using GAN and Least squares GAN.ppt
Generation of Deepfake images using GAN and Least squares GAN.ppt
DivyaGugulothu
 
Implementing Neural Style Transfer
Implementing Neural Style Transfer Implementing Neural Style Transfer
Implementing Neural Style Transfer
Tahsin Mayeesha
 
Variational Autoencoders For Image Generation
Variational Autoencoders For Image GenerationVariational Autoencoders For Image Generation
Variational Autoencoders For Image Generation
Jason Anderson
 
Seeing what a gan cannot generate: paper review
Seeing what a gan cannot generate: paper reviewSeeing what a gan cannot generate: paper review
Seeing what a gan cannot generate: paper review
QuantUniversity
 
StarGAN
StarGANStarGAN
StarGAN
Joonhyung Lee
 
Neural Radiance Fields & Neural Rendering.pdf
Neural Radiance Fields & Neural Rendering.pdfNeural Radiance Fields & Neural Rendering.pdf
Neural Radiance Fields & Neural Rendering.pdf
NavneetPaul2
 

Similar to Image colorization (20)

Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...
Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...
Let's paint a Picasso - A Look at Generative Adversarial Networks (GAN) and i...
 
Volodymyr Lyubinets “Generative models for images”
Volodymyr Lyubinets  “Generative models for images”Volodymyr Lyubinets  “Generative models for images”
Volodymyr Lyubinets “Generative models for images”
 
Decomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesisDecomposing image generation into layout priction and conditional synthesis
Decomposing image generation into layout priction and conditional synthesis
 
Brain Tumour Detection.pptx
Brain Tumour Detection.pptxBrain Tumour Detection.pptx
Brain Tumour Detection.pptx
 
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
Deep Generative Models - Kevin McGuinness - UPC Barcelona 2018
 
TransNeRF
TransNeRFTransNeRF
TransNeRF
 
Domain adaptation for Image Segmentation
Domain adaptation for Image SegmentationDomain adaptation for Image Segmentation
Domain adaptation for Image Segmentation
 
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
Alberto Massidda - Scenes from a memory - Codemotion Rome 2019
 
Automatic Detection of Window Regions in Indoor Point Clouds Using R-CNN
Automatic Detection of Window Regions in Indoor Point Clouds Using R-CNNAutomatic Detection of Window Regions in Indoor Point Clouds Using R-CNN
Automatic Detection of Window Regions in Indoor Point Clouds Using R-CNN
 
Deep Generative Modelling
Deep Generative ModellingDeep Generative Modelling
Deep Generative Modelling
 
Generative adversarial network_Ayadi_Alaeddine
Generative adversarial network_Ayadi_AlaeddineGenerative adversarial network_Ayadi_Alaeddine
Generative adversarial network_Ayadi_Alaeddine
 
190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...
190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...
190410 sc fegan-face_editing_generative_adversarial_network_with_users_sketch...
 
Face-GAN project report.pptx
Face-GAN project report.pptxFace-GAN project report.pptx
Face-GAN project report.pptx
 
Face-GAN project report
Face-GAN project reportFace-GAN project report
Face-GAN project report
 
Generation of Deepfake images using GAN and Least squares GAN.ppt
Generation of Deepfake images using GAN and Least squares GAN.pptGeneration of Deepfake images using GAN and Least squares GAN.ppt
Generation of Deepfake images using GAN and Least squares GAN.ppt
 
Implementing Neural Style Transfer
Implementing Neural Style Transfer Implementing Neural Style Transfer
Implementing Neural Style Transfer
 
Variational Autoencoders For Image Generation
Variational Autoencoders For Image GenerationVariational Autoencoders For Image Generation
Variational Autoencoders For Image Generation
 
Seeing what a gan cannot generate: paper review
Seeing what a gan cannot generate: paper reviewSeeing what a gan cannot generate: paper review
Seeing what a gan cannot generate: paper review
 
StarGAN
StarGANStarGAN
StarGAN
 
Neural Radiance Fields & Neural Rendering.pdf
Neural Radiance Fields & Neural Rendering.pdfNeural Radiance Fields & Neural Rendering.pdf
Neural Radiance Fields & Neural Rendering.pdf
 

Recently uploaded

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 

Recently uploaded (20)

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 

Image colorization

  • 1. Image Colorization Using CycleGAN Zahil Shanis Yash Saraf Sai Varun
  • 2. Generative Adversarial Networks ● Generative models with two competing differentiable functions, represented by neural networks. ● Generator: Generates data from random noise using feedback from discriminator. ● Discriminator: A classifier to identify real data from fake (synthesized) data. We train the generator to create data towards what the discriminator thinks is real.
  • 3. CycleGAN ● Proposed by Jun-Yan Zhu, Taesung Park, Phillip Isola and Alexei A. Efros ● Performs unpaired image to image translation. ● Unpaired translation - doesn’t require a training set of aligned image pairs. ● Cycle GAN can translate an image from a source domain X to a target domain Y in the absence of paired examples.
  • 4. Cycle GAN Architecture ● Architecture consists of two mappings: G : X -> Y and F : Y -> X. ● A generator G is used to translate real image from domain X to domain Y. ● A generator F is used to translate real image from domain Y to domain X. ● Discriminators (Dx and Dy) are used to discriminate real and fake images at respective domains.
  • 5. Cycle GAN Cost Function ● In addition to the Generator and Discriminator losses, CycleGAN uses one more type of loss called Cycle Consistency Loss. ● This enforces that the input and generated output are recognizably the same. ● Final Objective Function is given by:
  • 6. Image Colorization with Cycle GAN ● Colorize gray scale images using Cycle GAN architecture. ● Training on unpaired flowers dataset - domain X as gray scale images and domain Y as color images. Network Architecture ● Generator: A UNet like architecture with an encoder, transformer and decoder. ● Discriminator: PatchGANS which look at a “patch” of the input image, and output the probability of the patch being “real”. ● Trained with a batch size of 1 with Adam as the optimizer.
  • 8. Network Modifications 1) Cycle GAN with Stochastic Generators ● Inter domain mapping from unpaired data need not always be one-to-one or deterministic. ● Stochastic Cycle GAN - Generates multiple color images for a single grayscale image. ● Can be achieved by modifying the generator GAB to take a vector of noise and a sample from the source domain, and generates a non-deterministic sample in the target domain. ● With different noise z ~ p(z), model can generate different domain B mappings. ● Inspired from Conditional Instance Normalization for Style Transfer paper by Huang et al. ● We are working on implementing this.
  • 9. Network Modifications 2) Cycle GAN with Capsule Nets ● In CNN, Pooling layers are used to increase the field of view and predict higher order features by combining values. ● Use of Capsule Nets helps preserve hierarchical pose relationships between object parts.
  • 10. Network Modifications ● Capsule Networks and GANs - Using a Capsule Network as a discriminator to better train the model to understand spatial differences. ● Papers CapsGAN, and CapsuleGAN, takes forward the idea by replacing the DCGAN discriminator with CapsuleGANs.
  • 11. Conditional GAN (pix2pix) ● Performs paired image to image translation. ● In an unconditioned generative model, there is no control on modes of the data being generated. ● In the CGAN, the generator learns to generate a fake sample with a specific condition or characteristics rather than a generic sample from unknown noise distribution.
  • 12. Conditional GAN (pix2pix) Training a conditional GAN Combined Loss Function
  • 13. References ● Cycle GAN paper by Zhu et al - https://arxiv.org/pdf/1703.10593.pdf ● Blog Cycle GAN - https://medium.com/@jonathan_hui/gan-cyclegan-6a50e7600d7 ● Cycle GAN implementation - https://github.com/eriklindernoren/Keras-GAN ● Keras documentation - https://keras.io/ ● CapsuleGAN implementation - https://github.com/gusgad/capsule-GAN/blob/master/capsule_gan.ipynb ● CapsGAN - https://arxiv.org/abs/1806.03968 ● CapsuleGAN - https://arxiv.org/abs/1802.06167 ● Capsule Networks - https://arxiv.org/abs/1710.09829 ● Blog Capsule Networks - https://medium.com/ai%C2%B3-theory-practice-business/understanding-hintons-capsule-networks- part-i-intuition-b4b559d1159b ● Conditional Instance Normalization - https://arxiv.org/pdf/1703.06868.pdf ● Pix2pix implemntation - https://github.com/eriklindernoren/Keras-GAN/tree/master/pix2pix ● Pix2pix - https://arxiv.org/abs/1611.07004

Editor's Notes

  1. Conceptually speaking, discriminator in the network give guidance to generator on what data to create. As we train the networks arternatively, eventually, the discriminator identifies the tiny difference between the real and the generated, and the generator creates images that the discriminator cannot tell the difference. The GAN model eventually converges and produces data indistinguishable from real data.
  2. Max pooling loses important relevant information about translational and rotational relationship between the objects. Using Primary Caps, the digit caps are calculated using Dynamic routing algorithms. Now, these are fed to the decoder network. The model is trained using Reconstruction loss from decoder network.
  3. Promising results for MNIST and CIFAR datasets. Outperforms simple GAN by 2-3 percent.
  4. In the Conditional GAN (CGAN), the generator learns to generate a fake sample with a specific condition or characteristics (such as a label associated with an image or more detailed tag) rather than a generic sample from unknown noise distribution.
  5. Training a conditional GAN . The conditioning image, x is applied as the input to the generator and as input to the discriminator. The generator in this case is trying to learn how to colorize a black and white image. The discriminator is looking at the generator’s colorization attempts and trying to learn to tell the difference between the colorizations the generator provides and the true colorized target image provided in the dataset. The discriminator, D, learns to classify between fake (synthesized by the generator) and real images. The generator, G, learns to fool the discriminator.