SlideShare a Scribd company logo
1 of 53
Download to read offline
Photo Enhance
01
Agenda
Problems and Architecture
• Pipeline
• Why Classical CV is still awesome
• Why GANs not the best solution
• HSV vs RGB vs YUV
Other steps
• Super Resolution
• Style Transfer
• Noise & aberration reduction. Why JPEG
is a problem
02
03
Color enhancing
• AutoHDR
• Real-Time photo color enhance
with Bilateral Filter
AGENDA:
Problems and
Architecture
01
Pipeline
Raw to 16-32bit Image Noise & aberration reduction
Color EnhanceStyle Transfer
Super ResolutionSkin editing / Painting
Why Classical CV is still awesome
● White box solution
● Many tasks are based on optical physics and clean mathematics so no NN
needed
● Controlled result which is very important for professional photo editing
● Very fast and can be used almost on any device
● No training and datasets needed
- Some very simple examples of color enhancing with polynomial in my article
- Building shape descriptor of image
- Unwarping example
Why GANs not the best solution
● To many uncontrolled artifacts
● Require a lot of computational resources
● Hard to train (Mode collapse, dying gradient, etc)
● Need big datasets
So it’s Money x Money x Money = Money3
And bad for data conversion
Why GANs not the best solution
BigGan - 1 training cycle: 15 days, 8xGPUs, ~$8k-$12k
RGB vs YUV vs HSV
RGB
- Good for NN
- Bad for classic CV
- Not human readable
YUV
- Good for NN
- So-so for classic CV
- Not human readable
- Efficient coding,
reduce bandwidth
HSV
- Bad for NN
- Good for classic CV
- Human readable
- Based on RGB (not
real colorspace)
02AGENDA:
Color enhancing
10
Auto HDR
Auto HDR
Raw - Sensors has different physical grid,
Formats has different strategy for saving data,
Sensors data has to be processed differently.
PAIN
Use 3d party software: pip install rawkit
Auto HDR
Overexposed better then Underexposed
That how sensors built
Auto HDR
White Balance - Photographers are wrong, classical CV not always right
Train NN to learn objects that should be
white and use this for your WB settings
Auto HDR
Camera Response Function (CRF) - relates scene irradiance to image intensities.
It needed for most HDR transformations
God save OpenCV developers
Auto HDR
CLAHE - Adaptive histogram equalisation. Useful algorithm to solve histogram
imbalance of the image. Visually similar to what HDR trying to do
OpenCV, scikit-image and many others
Auto HDR
HDR - Basically we fuse few images with different parameters to get good
exposure of every object in the image. Tone Mapping technique used to map 32bit
image to 8bit image(for most devices)
OpenCV
Auto HDR
And yes we can do same with one image
Auto HDR
Now merge all things together and we will get something like this
Auto HDR
Now merge all things together and we will get something like this
10
HDRNet
Real-Time photo color enhance with
Bilateral Filter
Bilateral Filter
Main idea of it that it use not only spatial distance,
but also intensity distance.
Bilateral Filter
Bilateral Grid
HDRNet
HDRNet
Input Result Ground Truth
HDRNet
Input Result Ground Truth
HDRNet
https://github.com/creotiv/hdrnet/
https://github.com/creotiv/hdrnet-pytorch/ - under development
- Only color enhance
- Uses some sort of segmentation with Bilateral Grid
- Supervised learning
- Cant handle edge noise
- Small network cant handle vast input image params (should be unified)
HDRNet
Other interesting solutions
https://github.com/nothinglo/Deep-Photo-Enhancer
https://github.com/yuanming-hu/exposure
03
AGENDA:
Other steps
Super Resolution
Super Resolution - SRGAN
Super Resolution - ESRGAN
Super Resolution - SFTGAN
Super Resolution - SFTGAN
Input Bicubic ESRGAN
Super Resolution - SFTGAN
Super Resolution - ESRGAN
Changes from SRGAN
- Deeper model using Residual-in-Residual Dense Block (RRDB)
- Use Relativistic average GAN instead of the vanilla GAN.
- Improve the perceptual loss by using the features before activation.
- Pixel Shuffle replaced by Nearest Interpolation
- Pretrain Generator model before use in GAN
- Removed Batch Normalization to remove artifacts
https://arxiv.org/abs/1809.00219
https://arxiv.org/abs/1804.02815
https://github.com/xinntao/ESRGAN
https://github.com/xinntao/SFTGAN
Super Resolution
What we can see from this improvements?
- Context and Data is what matter
- All things like BN, Max Pooling which destroy data making worse for generator
- Understanding materials behind the image can greatly improve quality
- Skip connection passing context to the end of network also improve results
Style Transfer
Style Transfer
Style Transfer
Style Transfer
Style Transfer
What matter
- No MaxPool on Encoder network use strides
- Style poisoning works not so good as we want
- No BatchNorm on Transformer network
Adaptive Style Transfer
Adaptive Style Transfer
Adaptive Style Transfer
What matter
- GAN, for such tasks when Loss hard to build
- Multiple Artworks per style
- Additional loss - maybe, hard to tell
https://compvis.github.io/adaptive-style-transfer/
Noise & Aberrations
Jpeg Noise
https://csfieldguide.org.nz/en/chapters/coding-
compression/image-compression-using-jpeg/
Low frequencies
High frequencies
Jpeg Noise
- Waste context loss
- Noise position static
- Noise patterns repetitive
- Transform function is not
bijective
F (X1)
F (X2)
Jpeg Noise
UnBlock http://www.johncostella.com/unblock/
Wavelet transforms https://sci-hub.tw/10.1109/ICIEA.2006.257369
+
Detalisation Gan Network ~ SuperRes Network
https://pywavelets.readthedocs.io/en/latest/
Hot Noise aka Grain Noise
God Bless AutoEncoders
Simple MNIST Example http://bit.ly/2TDQaFr
Noise2Noise (Unsupervised) https://github.com/NVlabs/noise2noise
(https://arxiv.org/abs/1803.04189)
Chromatic Aberration
Chromatic Aberration
TCA_Correct + Hugin(Fulla) https://wiki.panotools.org/Tca_correct
https://wiki.panotools.org/Lens_correction_model
Thanks
Help to save homeless animals
Donate to animal shelter
BIT.LY / MLCATS
fb.me / anikishaev t.me / ml_world

More Related Content

Similar to Photo echance. Problems. Solutions. Ideas

Harnessing the power of Generative Adversarial Networks (GANs) for supervised...
Harnessing the power of Generative Adversarial Networks (GANs) for supervised...Harnessing the power of Generative Adversarial Networks (GANs) for supervised...
Harnessing the power of Generative Adversarial Networks (GANs) for supervised...
Scaleway
 
Webinar -- G7 for Grand Format Printers
Webinar -- G7 for Grand Format PrintersWebinar -- G7 for Grand Format Printers
Webinar -- G7 for Grand Format Printers
RPimaging, INC
 
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex Vlachos
 

Similar to Photo echance. Problems. Solutions. Ideas (20)

We should optimize images
We should optimize imagesWe should optimize images
We should optimize images
 
NCET Tech Bite - Photoshop - July 2015
NCET Tech Bite - Photoshop - July 2015NCET Tech Bite - Photoshop - July 2015
NCET Tech Bite - Photoshop - July 2015
 
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
 
Design in Motion: Video Production Workflow
Design in Motion: Video Production WorkflowDesign in Motion: Video Production Workflow
Design in Motion: Video Production Workflow
 
Harnessing the power of Generative Adversarial Networks (GANs) for supervised...
Harnessing the power of Generative Adversarial Networks (GANs) for supervised...Harnessing the power of Generative Adversarial Networks (GANs) for supervised...
Harnessing the power of Generative Adversarial Networks (GANs) for supervised...
 
Digital Historian Series: Using Digital Tools for Archival Research
Digital Historian Series: Using Digital Tools for Archival ResearchDigital Historian Series: Using Digital Tools for Archival Research
Digital Historian Series: Using Digital Tools for Archival Research
 
Webinar -- G7 for Grand Format Printers
Webinar -- G7 for Grand Format PrintersWebinar -- G7 for Grand Format Printers
Webinar -- G7 for Grand Format Printers
 
AWS Webcast - What's new with Amazon Elastic Transcoder
AWS Webcast - What's new with Amazon Elastic TranscoderAWS Webcast - What's new with Amazon Elastic Transcoder
AWS Webcast - What's new with Amazon Elastic Transcoder
 
IMAGE PROCESSING
IMAGE PROCESSINGIMAGE PROCESSING
IMAGE PROCESSING
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
 
P1.1
P1.1P1.1
P1.1
 
Putting Your Images on a Diet (SmashingConf, 2014)
Putting Your Images on a Diet (SmashingConf, 2014)Putting Your Images on a Diet (SmashingConf, 2014)
Putting Your Images on a Diet (SmashingConf, 2014)
 
Presentation shortstory
Presentation shortstoryPresentation shortstory
Presentation shortstory
 
Research on image processing based on fpga
Research on image processing based on fpgaResearch on image processing based on fpga
Research on image processing based on fpga
 
MPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video EncodingMPEG-1 Part 2 Video Encoding
MPEG-1 Part 2 Video Encoding
 
Getting started with High-Definition Render Pipeline for games- Unite Copenha...
Getting started with High-Definition Render Pipeline for games- Unite Copenha...Getting started with High-Definition Render Pipeline for games- Unite Copenha...
Getting started with High-Definition Render Pipeline for games- Unite Copenha...
 
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
Alex_Vlachos_Advanced_VR_Rendering_Performance_GDC2016
 
HiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use CasesHiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use Cases
 
AWS Webcast - What's New with Amazon Elastic Transcoder
AWS Webcast - What's New with Amazon Elastic TranscoderAWS Webcast - What's New with Amazon Elastic Transcoder
AWS Webcast - What's New with Amazon Elastic Transcoder
 
DigitRecognition.pptx
DigitRecognition.pptxDigitRecognition.pptx
DigitRecognition.pptx
 

More from Andrew Nikishaev

More from Andrew Nikishaev (10)

What is ML and how it can be used in sport
What is ML and how it can be used in sportWhat is ML and how it can be used in sport
What is ML and how it can be used in sport
 
Crypto trading - the basics
Crypto trading - the basicsCrypto trading - the basics
Crypto trading - the basics
 
Machine learning for newbies
Machine learning for newbiesMachine learning for newbies
Machine learning for newbies
 
Neo4j after 1 year in production
Neo4j after 1 year in productionNeo4j after 1 year in production
Neo4j after 1 year in production
 
Ideal pitch - for investors and clients
Ideal pitch - for investors and clientsIdeal pitch - for investors and clients
Ideal pitch - for investors and clients
 
От идеи до рабочей MVP
От идеи до рабочей MVPОт идеи до рабочей MVP
От идеи до рабочей MVP
 
Sit&fit - uderdesk stepper trainer with charger
Sit&fit - uderdesk stepper trainer with chargerSit&fit - uderdesk stepper trainer with charger
Sit&fit - uderdesk stepper trainer with charger
 
Тонкости работы с Facebook
Тонкости работы с FacebookТонкости работы с Facebook
Тонкости работы с Facebook
 
Построение Business Model Canvas и Value Proposition Canvas
Построение Business Model Canvas и Value Proposition CanvasПостроение Business Model Canvas и Value Proposition Canvas
Построение Business Model Canvas и Value Proposition Canvas
 
Нетворкинг и Социальная Инженерия
Нетворкинг и Социальная ИнженерияНетворкинг и Социальная Инженерия
Нетворкинг и Социальная Инженерия
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Photo echance. Problems. Solutions. Ideas