Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for...

43
Looking into the dark: from image to video Zibo Meng Deep Learning Scientist OPPO US R&D

Transcript of Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for...

Page 1: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Looking into the dark: from

image to videoZibo Meng

Deep Learning ScientistOPPO US R&D

Page 2: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Entered 40+ markets

Ranked #5 in 2020 Q1*

More than 350 million users

* https://www.counterpointresearch.com/global-smartphone-shipments-plummet-300mn/

Page 3: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

(Headquarter · Shenzhen)

Beijing Research CenterDongguan Research Center

Page 4: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

What’s hidden in the dark

Night

Page 5: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

What’s hidden in the dark

Night

Page 6: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

What’s hidden in the dark

“Lux” is the standard unit of measure for illumination (i.e. brightness) of a

surface at a given point.

Night

Page 7: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

What’s hidden in the dark

“Lux” is the standard unit of measure for illumination (i.e. brightness) of a

surface at a given point.

illuminance

direct sunlight ~100K lux

daylight

(non-direct sunlight)~10K lux

dark (e.g. moonlight) < 1 lux

Night

Page 8: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Traditional Camera Pipelinesub-optimal results due to low signal-to-noise ratio

(low photon counts in the dark)

RAW

ISP:

Demosaicking

White balance

Color correction

Gamma

correction

Tone mapping

RGB

Page 9: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Imaging in the dark

Raise ISO sensitivity to gain brightness?

noise amplification in the electronic signal

Increase exposure time?

blur due to hand shake or object motion

Use flash?

reflections, glare, shadows

Page 10: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Let AI do the work

RAW AI RGB

Page 11: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

What’s inside

AI

Page 12: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Convolutional Neural Network

Loss F

unctio

ns

What’s inside

AI

Page 13: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

A Convolutional Neural Network

A U-net: an encoder-decoder network

Works great for image-to-image translation, but yields results with color inconsistency.

Chen et. al. & Zamir et. al.

Page 14: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

A Convolutional Neural Network

A U-net: an encoder-decoder network

Works great for image-to-image translation, but yields results with color inconsistency.

OPPO dark sight net

Page 15: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

A Convolutional Neural Network

A U-net: an encoder-decoder network

Works great for image-to-image translation, but yields results with color inconsistency.

Chen et. al. & Zamir et. al.

OPPO dark sight net

Page 16: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

A Convolutional Neural Network

A U-net: an encoder-decoder network

Works great for image-to-image translation, but yields results with color inconsistency.

Chen et. al. & Zamir et. al.

OPPO dark sight net

Page 17: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Loss Functions

ℒ1 =1

𝑁∑𝑝=1

𝑁

𝑦

𝑝 − 𝑦𝑝

ℒ𝑆𝑆𝐼𝑀 = 1 −1

𝑁∑𝑝=1

𝑁

𝑆𝑆𝐼𝑀(𝑦

𝑝, 𝑦𝑝)

ℒ𝑀𝑆−𝑆𝑆𝐼𝑀 = 1 −1

𝑁∑𝑝=1

𝑁

𝑀𝑆−𝑆𝑆𝐼𝑀(𝑦

𝑝, 𝑦𝑝)

ℒ𝑝𝑒𝑟𝑐𝑒𝑝𝑡𝑢𝑎𝑙 =1

𝑁∑𝑝=1

𝑁

𝜙(𝑦

𝑝) − 𝜙(𝑦𝑝)2

Some Choices of Loss Functions

𝑀𝑆𝐸 =1

𝑁∑𝑝=1

𝑁

(𝑦

𝑝 − 𝑦𝑝)2

Page 18: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Loss Functions

𝑃𝑆𝑁𝑅 = 20 ⋅ log10𝑀𝑎𝑥𝑃𝑖𝑥𝑒𝑙𝑉𝑎𝑙𝑢𝑒

𝑀𝑆𝐸

Simple to calculate

Has clear physical meanings

Does not correlate very well with human’s perceived visual quality

Page 19: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Loss Functions

Structural Similarity (SSIM)

=

2𝜇𝑦𝑝𝜇𝑦𝑝 + 𝐶1

𝜇𝑦𝑝

2 + 𝜇𝑦𝑝2 + 𝐶1

2𝜎𝑦𝑝𝑦𝑝

+ 𝐶2

𝜎𝑦𝑝

2 + 𝜎𝑦𝑝2 + 𝐶2

= 𝑙(𝑦

𝑝, 𝑦𝑝) ⋅ 𝑐𝑠(𝑦

𝑝, 𝑦𝑝)

𝑆𝑆𝐼𝑀(𝑦

𝑝, 𝑦𝑝) = luminance ⋅ contrast ⋅ structure = 𝑙(𝑦

𝑝, 𝑦𝑝) ⋅ 𝑐(𝑦

𝑝, 𝑦𝑝) ⋅ 𝑠(𝑦

𝑝, 𝑦𝑝)

=

2𝜇𝑦𝑝𝜇𝑦𝑝 + 𝐶1

𝜇𝑦𝑝

2 + 𝜇𝑦𝑝2 + 𝐶1

2𝜎𝑦𝑝𝜎𝑦𝑝 + 𝐶2

𝜎𝑦𝑝

2 + 𝜎𝑦𝑝2 + 𝐶2

𝜎𝑦𝑝𝑦𝑝

+ 𝐶3

𝜎𝑦𝑝𝜎𝑦𝑝 + 𝐶3

𝐶1 = (𝐾1 ⋅ 𝑀𝑎𝑥𝑃𝑖𝑥𝑒𝑙𝑉𝑎𝑙𝑢𝑒)2𝐶2 = (𝐾2 ⋅ 𝑀𝑎𝑥𝑃𝑖𝑥𝑒𝑙𝑉𝑎𝑙𝑢𝑒)2𝐶3 = 𝐶2/2

Natural images are highly structured: pixels exhibit strong dependencies on each other

Sensitivity of human visual system (HVS) is related to:

luminance (mean) , contrast (variance), structure (covariance)

Page 20: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Loss Functions

Multi-Scale Structural Similarity (MS-SSIM)

𝐶1 = (𝐾1 ⋅ 𝑀𝑎𝑥𝑃𝑖𝑥𝑒𝑙𝑉𝑎𝑙𝑢𝑒)2𝐶2 = (𝐾2 ⋅ 𝑀𝑎𝑥𝑃𝑖𝑥𝑒𝑙𝑉𝑎𝑙𝑢𝑒)2

𝑆𝑆𝐼𝑀(𝑦, 𝑦) =

2𝜇𝑦 𝜇𝑦 + 𝐶1

𝜇𝑦2 + 𝜇𝑦

2 + 𝐶1⋅

2𝜎𝑦𝑦+ 𝐶2

𝜎𝑦2 + 𝜎𝑦

2 + 𝐶2= 𝑙(𝑦

, 𝑦) ⋅ 𝑐𝑠(𝑦

, 𝑦)

𝑀𝑆−𝑆𝑆𝐼𝑀(𝑦

𝑝, 𝑦𝑝) = 𝑙𝑀(𝑦

𝑝, 𝑦𝑝)𝛾𝑀

⋅ Π𝑘=1𝑀 𝑐𝑠𝑘(𝑦

𝑝, 𝑦𝑝)𝜂𝑘

MS-SSIM extends SSIM by computing variance and covariance components

at M scales

scale image = sub-sampling original image by factor of 2 in both spatial

dimensions for (k-1) times

More flexible than single-scale SSIM: incorporated variations of image

resolution and viewing conditions

𝑘𝑡ℎ

Page 21: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Loss Functions

ℒ𝑝𝑒𝑟𝑐𝑒𝑝𝑡𝑢𝑎𝑙 =1

𝑁∑𝑝=1

𝑁

𝜙(𝑦

𝑝) − 𝜙(𝑦𝑝)2

Perceptual Loss

Measures the difference between deep feature representations of the output and ground-truth

images, each extracted from a pre-trained neural network on ImageNet.

Enhances semantic similarity at deep feature representation level and serves as a perceptual

metric.

Zhang et. al. arXiv:1801.03924, CVPR 2018

Page 22: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Loss Functions

Chen et. al. (arXiv:1805.01934):

Zamir et. al. (arXiv:1904.05939):

OPPO:

ℒ1 also tried ℒ2 and ℒ𝑆𝑆𝐼𝑀 separately

𝛼 𝛽ℒ1 + (1 − 𝛽)ℒ𝑀𝑆−𝑆𝑆𝐼𝑀 + 1 − 𝛼 ℒ𝑝𝑒𝑟𝑐𝑒𝑝𝑡𝑢𝑎𝑙 𝛼 = 0.9 𝛽 = 0.99

ℒ1 ℒ𝑀𝑆−𝑆𝑆𝐼𝑀 ? ? ? ?

Page 23: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Quantitative Results

Sony 7SII camera

Bayer sensor

4240 x 2832

Fujifilm X-T2 camera

APS-C X-Trans sensor

6000 x 4000

PSNR SSIM PSNR SSIM

Chen et.

al.(arXiv:180

5.01934)

28.88 0.787 26.61 0.68

Zamir et.

al.(arXiv:1904

.05939)

29.43 - 27.63 -

OPPO 29.72 0.795 28.15 0.722

𝑃𝑆𝑁𝑅 = 10 ⋅ log10𝑀𝑎𝑥𝑃𝑖𝑥𝑒𝑙𝑉𝑎𝑙𝑢𝑒2

𝑀𝑆𝐸𝑀𝑒𝑎𝑛𝑆𝑞𝑢𝑎𝑟𝑒𝑑𝐸𝑟𝑟𝑜𝑟(𝑀𝑆𝐸) =

1

𝑁∑𝑝=1

𝑁

𝑦

𝑝 − 𝑦𝑝2

Page 24: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Qualitative Results

Fujifilm X-T2 camera (APS-C X-Trans sensor, 6000 x 4000)

ISO = 6400

exposure time = 100ms

Page 25: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Qualitative ResultsChen et. al. Zamir et. al.

OPPO Ground truth

Page 26: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Deliver to Cell Phones

RAW AI ISP RGB

Page 27: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Deliver to Cell Phones

Page 28: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Light up the darkness

Ultra Dark

Night

Page 29: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Light up the darkness

Ultra Dark

Night

Page 30: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Light up the darkness

Night

Ultra Dark

Page 31: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight
Page 32: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight
Page 33: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

More demonstrations

Nig

ht

Ultra Dark

Page 34: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

More demonstrations

Nig

ht

Page 35: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

More demonstrations

Nig

ht

Ultra Dark

Page 36: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

More demonstrations

Nig

ht

Page 37: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

More demonstrations

Nig

ht

Ultra Dark

Page 38: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

More demonstrations

Nig

ht

Page 39: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Move to videos

Hard to produce paired data for videos

The algorithm should run in real time

The processed frames should be temporally consistent

Page 40: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Move to videos

Hard to produce paired data for videos

Adopted the model based on single images

The algorithm should run in real time

The processed frames should be temporally consistent

Page 41: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Move to videos

Hard to produce paired data for videos

Adopted the model based on single images

The algorithm should run in real time

The model should be extensively compressed

The processed frames should be temporally consistent

Page 42: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Move to videos

Hard to produce paired data for videos

Adopted the model based on single images

The algorithm should run in real time

The model should be extensively compressed

The processed frames should be temporally consistent

A temporal filtering approach should be employed

Page 43: Light up the darkness...What’s hidden in the dark “Lux” is the standard unit of measure for illumination (i.e. brightness) of a surface at a given point. illuminance direct sunlight

Thank you!