본문 펼치기
Computer Vision and Image Understanding
journal homepage: www.elsevier.com
## Physics-based Shading Reconstruction for Intrinsic Image Decomposition
Anil S. Baslamisli <sup>a,∗∗</sup>, Yang Liu <sup>b</sup>, Sezer Karaoglu <sup>b</sup>, Theo Gevers <sup>a,b</sup>
_aUniversity of Amsterdam, Science Park 904, 1098XH Amsterdam, the Netherlands_
_b3DUniversum, Science Park 400, 1098XH Amsterdam, the Netherlands_
ABSTRACT
We investigate the use of photometric invariance and deep learning to compute intrinsic images (albedo
and shading). We propose albedo and shading gradient descriptors which are derived from physics-based models. Using the descriptors, albedo transitions are masked out and an initial sparse shading
map is calculated directly from the corresponding _RGB_ image gradients in a learning-free unsupervised manner. Then, an optimization method is proposed to reconstruct the full dense shading map.
Finally, we integrate the generated shading map into a novel deep learning framework to refine it and
also to predict corresponding albedo image to achieve intrinsic image decomposition. By doing so,
we are the first to directly address the texture and intensity ambiguity problems of the shading estimations. Large scale experiments show that our approach steered by physics-based invariant descriptors
achieve superior results on MIT Intrinsics, NIR-RGB Intrinsics, Multi-Illuminant Intrinsic Images,
Spectral Intrinsic Images, As Realistic As Possible, and competitive results on Intrinsic Images in the
Wild datasets while achieving state-of-the-art shading estimations.
⃝c 2020 Elsevier Ltd. All rights reserved.
1. Introduction
Intrinsic image decomposition is the inverse problem of recovering the image formation components, such as reflectance
and shading (Barrow and Tenenbaum, 1978). The shading component consists of light effects such as direct illumination, geometry, shadow casts and ambient light. The reflectance component represents the (albedo) color of an object and is free of
any lighting effect. Intrinsic images are favorable for various
computer vision tasks. For example, albedo images are beneficial for semantic segmentation algorithms because of their
illumination invariant representation (Baslamisli et al., 2018a).
Similarly, most of the scene editing applications, such as recoloring, rely on albedo images (Ye et al., 2014), whereas shading
images are preferred for relighting tasks (Shu et al., 2017).
The pioneering work on intrinsic image computation is the
Retinex algorithm by Land and McCann (1971) which uses a
heuristic that is based on the rectilinear Mondrian world assumption. In a Mondrian world, where surfaces have piecewise constant colors, strong gradients correspond to albedo
∗∗Corresponding author:
_e-mail:_ `a.s.baslamisli@uva.nl` (Anil S. Baslamisli)
changes, while shading variations are related to weaker ones.
Then, using a re-integration algorithm (i.e. Poisson) over
the strong (albedo) gradients, the albedo component is computed. However, classifying image gradients into albedo or
shading is not a trivial task due to various photometric effects such as strong shadow casts, illuminant color, surface
geometry changes or weak albedo transitions. For instance,
shadow boundaries or abrupt changes in surface geometry may
cause strong intensity shifts and may therefore be interpreted
as albedo changes. Moreover, the Mondrian world assumption do not apply to real world scenes. Other traditional approaches usually utilize an optimization process by introducing constraints on the intrinsic components (Gehler et al., 2011;
Shen et al., 2011; Barron and Malik, 2015). Most of the priors aim at constraining the albedo component such as global reflectance sparsity, piece-wise constant reflectance or chromaticity reflectance correlation. On the other hand, the shading intrinsic is usually constrained by a smoothness prior.
More recent methods rely on deep learning models, specialized loss functions, and large scale datasets. For example,
Baslamisli et al. (2018b) provide an end-to-end solution to the
Retinex approach in a deep learning framework, Li and Snavely
(2018a) combine four datasets with specialized loss functions
to impose constraints, and Lettry et al. (2018a) investigate ad
Fig. 1. Color leakage problem in the estimated shading maps. It negatively
e ff ects the albedo separation from the shading.
versarial learning. With the availability of densely annotated
synthetic datasets and multiple constraints on the albedo component, CNN-based methods are capable of estimating high
quality albedo maps. However, CNN-based shading estimations regularly suffer from texture and intensity ambiguities
(e.g. albedo leakage) introducing (color) artifacts in the shading
profiles. See Figure 1 for an illustration.
In the early days of photometric invariance in computer vision, invariant image descriptors were widely used for different
vision tasks. These descriptors are invariant to certain image
capturing conditions so that the vision algorithms are not affected by them, such as illumination color, surface geometry or
camera position. Successful results were demonstrated for object recognition (Gevers and Smeulders, 1997), image retrieval
(Gevers and Smeulders, 2000), and shadow removal (Finlayson
et al., 2006). As CNN-based shading estimations suffer from
(color) artifacts, physics-based invariant features may be useful
to steer the intrinsic image decomposition process.
Therefore, we investigate the use of photometric invariance
and deep learning to compute intrinsic images (albedo and
shading). We propose albedo and shading gradient descriptors
which are derived from physics-based models. Using the descriptors, albedo transitions are masked out and an initial shading map is calculated directly from the corresponding _RGB_ image gradients in a learning-free manner (unsupervised). Then,
an optimization method is proposed to reconstruct the full shading map. Finally, we integrate the shading map into a deep
learning model to achieve full intrinsic image decomposition.
Contributions. _1._ We are the first to use photometric invariance and deep learning to address the intrinsic image decomposition task. _2._ We propose albedo and shading gradient
descriptors using physics-based models. _3._ The shading map is
calculated directly from the corresponding _RGB_ image gradients in a learning-free (unsupervised) manner. _4._ We propose a
novel deep learning model to leverage the physics-based shading map for the intrinsic image decomposition task. By doing
so _5._ we are the first to directly address the color leakage problem in the estimated shading maps. Finally, _5._ we extend the
dataset of Baslamisli et al. (2018b) from 15,000 to 50,000 images to train our models, which will be publicly available.
2. Related Work
Intrinsic image decomposition is an ill-posed and underconstrained problem. The pioneering work is the Retinex algorithm by Land and McCann (1971) based on the assumption that albedo changes cause large gradients, whereas shading variations result in smaller ones. In general, traditional approaches use different optimization processes to constrain the
intrinsic components together with the Retinex heuristic. For
example, Gehler et al. (2011) impose constraints on the global
albedo sparsity. SIRFS estimates shape, chromatic illumination, albedo, and shading from a single image by applying seven
different constraints on the intrinsic components (Barron and
Malik, 2015). Intrinsic Images in the Wild (IIW) model combines commonly used priors together with a dense conditional
random field (Bell et al., 2014). Shen et al. (2011) use optimization to constraint neighboring pixels having similar intensity values to have similar albedo values. Shen et al. (2008)
exploit non-local texture cues by constraining distinct points
with the same intensity-normalized textures to have the same
albedo values. Furthermore, user interactions are investigated
as additional priors to specify albedo values (Bousseau et al.,
2009; Shen et al., 2013). Finally, image sequences of the same
scene under varying illumination are used to impose constant
albedo (Weiss, 2001; Matsushita et al., 2004). Most of the priors mentioned above are related to the albedo intrinsic. It is
partially due to color information being more descriptive for
robust computer vision algorithms (van de Sande et al., 2009).
It is also relatively harder to define priors for the shading intrinsic, because geometry and lighting information are entangled in
the representation.
With the introduction of large-scale synthetic datasets, recent research use convolutional neural networks (Shi et al.,
2017; Baslamisli et al., 2018a; Li and Snavely, 2018a). Narihira et al. (2015) are the first to use CNNs to learn the task
end-to-end in a data-driven manner. Shi et al. (2017) make
use of a very large scale dataset along with a specialized network to exploit correlations between the intrinsic components.
Baslamisli et al. (2018b) convert the Retinex approach into a
deep learning framework together with a physics-based image
formation loss. Cheng et al. (2018) use a Laplacian pyramid inspired neural network architecture to exploit scale space properties. Lettry et al. (2018a) explore adversarial residual networks.
Fan et al. (2018) apply a domain filter guided by a learned
edge map to flatten the albedo estimations. Li and Snavely
(2018a) combine four datasets with specialized loss functions.
Janner et al. (2017) explore the problem in a self-supervised
setting by estimating albedo, shape, and lighting, where shape
and lighting estimations are used to train a differentiable shading function. Baslamisli et al. (2019) further decomposes the
shading into different photometric effects. Image sequences of
the same scene under varying illumination are also explored by
deep learning approaches (Lettry et al., 2018b; Li and Snavely,
2018b). Recent work focusing on inverse rendering tasks also
achieve superior albedo estimations (Sengupta et al., 2019; Li
et al., 2020). Nonetheless, these methods are limited by indoor
settings and require surface normal and environmental lighting
supervision.
CNN-based methods are capable of estimating high quality albedo maps that are mostly free of photometric effects.
However, their shading estimations are often negatively affected
by albedo transitions causing texture ambiguities and intensity
variations, as illustrated in Figure 1. To mitigate the problem,
for example, Zhou et al. (2019) shift the problem of predicting
shading to predicting surface normals and lighting properties.
Yet, their work is limited by indoor settings and require additional modalities and supervision, similar to inverse rendering
works. Another example is CGIntrinsics which over-smooths
the shading estimations, yet that in return causes structure loss
in the shading maps (Li and Snavely, 2018a). As CNN-based
shading estimations suffer from albedo artifacts, invariant image representations may be favorable to steer the process. They
were widely used for various image understanding tasks (Drew
et al., 1998; Finlayson et al., 1998, 2006; Gevers and Smeulders, 1997, 1998, 2000). One example is the illumination invariant color ratio features used for robust object recognition
(Finlayson, 1992). Stricker (1992) combine ratio histograms
with boundary histograms for a more robust framework. Nayar and Bolle (1996) utilize color ratios for pose estimation.
Matas et al. (1995) embed ratio information into a graph representation also for efficient object recognition. Barnard and
Finlayson (2000) identify probable shadow regions using color
ratios. Gevers and Smeulders (2001) exploit ratio gradients for
image retrieval. As invariant image representations are independent of the certain imaging conditions, they may be useful
to improve CNN-based shading estimation as part of intrinsic
image decomposition. To this end, in this paper, we investigate
the use of photometric invariance and deep learning to compute
intrinsic images (albedo and shading).
3. Methodology
_3.1._ _Image Formation Model_
We use the dichromatic reflection model of Shafer (1985) to
describe an _RGB_ image. The model defines a surface (image)
_I_ as a combination of diffuse _Id_ and specular _Is_ reflections as
follows:
_I_ = _Id_ + _Is_ . (1)
We assume that the diffuse reflection component dominates the
imaging conditions and hence the effect of the specular reflection component is negligible, i.e. _I_ ≈ _Id_ . Then, an image _I_ over
the visible spectrum ω is modelled by:
This equation models an image by the multiplication of its geometry _m_ (⃗ _n_,⃗ _l_ ) <sup>_x_</sup>, albedo ρ _c_ <sup>_x_</sup> <sup>and light source properties</sup> <sup>_e_</sup> _c_ <sup>_x_</sup> <sup>at pixel</sup>
_x_ . Then, these characteristics are used to define intrinsic images
as follows:
_c_ <sup>_x_</sup> <sup>= ρ</sup> _c_ <sup>_x_</sup>
_Ic_ <sup>_x_</sup>
_c_ <sup>_x_</sup> <sup>=</sup> <sup>_S x_</sup> _c_
<sup>_x_</sup> _c_ <sup>×</sup> <sup>_R_</sup> _c_ <sup>_x_</sup>
_c_ <sup>_x_</sup> <sup>,</sup> _S_ _c_ <sup>_x_</sup> <sup>⃗</sup>
_c_ <sup>_x_</sup> <sup>=</sup> <sup>_m_</sup> <sup>(⃗</sup> <sup>_n_</sup> <sup>,⃗</sup> <sup>_l_</sup> <sup>)</sup> <sup>_x_</sup> <sup>_e_</sup> _c_ <sup>_x_</sup>
<sup>⃗</sup> _c_ <sup>_x_</sup> <sup>,</sup> _Rc_ <sup>_x_</sup>
_c_ <sup>_x_</sup> <sup>,</sup> (4)
where an image _Ic_ at _x_ can be modelled by the element-wise
product of its shading _S c_ and albedo _Rc_ components. If the light
source _e_ is colored, then the color information is embedded in
the shading component.
_3.2._ _Albedo Gradients_
Using Equation 3, the image formation model for the three
color channels _c_ ∈{ _R_, _G_, _B_ } becomes:
_R_ <sup>_x_</sup> = _m_ ( _n_ ⃗,⃗ _l_ ) <sup>_x_</sup> _eR_ <sup>_x_</sup>
_R_ <sup>_x_</sup> <sup>,</sup>
_G_ <sup>_x_</sup> <sup>,</sup>
_B_ <sup>_x_</sup> <sup>.</sup>
⃗ _eR_ <sup>_x_</sup> <sup>ρ</sup> _R_ <sup>_x_</sup>
⃗ _G_ <sup>_x_</sup> <sup>ρ</sup> _G_ <sup>_x_</sup>
⃗ _eB_ <sup>_x_</sup> <sup>ρ</sup> _B_ <sup>_x_</sup>
_G_ <sup>_x_</sup> = _m_ ( _n_ ⃗,⃗ _l_ ) <sup>_x_</sup> _eG_ <sup>_x_</sup>
_B_ <sup>_x_</sup> = _m_ (⃗ _n_,⃗ _l_ ) <sup>_x_</sup> _eB_ <sup>_x_</sup>
(5)
Considering only neighbouring pixels _x_ 1 and _x_ 2, locally constant illumination can be assumed: _ec_ <sup>_x_</sup> <sup>1</sup> = _ec_ <sup>_x_</sup> <sup>2</sup> <sup>(Land</sup> <sup>and</sup> <sup>Mc-</sup>
Cann, 1971). By taking the difference of the logarithmic transformation of each color channel, the albedo descriptors are defined as follows:
_G_ <sup>_<u>R</u>_</sup> <sup>,</sup> <sup>_m_</sup> <sup>2</sup> <sup>= ∆</sup> <sup>log</sup> <sup>_<u>R</u>_</sup> _B_
(6)
<sup>_<u>G</u>_</sup> _B_ <sup>.</sup>
_m_ 1 = ∆ log _G_ <sup>_<u>R</u>_</sup>
<sup>_<u>R</u>_</sup> _B_ <sup>,</sup> <sup>_m_</sup> <sup>3</sup> <sup>= ∆</sup> <sup>log</sup> <sup>_<u>G</u>_</sup> _B_
We illustrate the invariant properties of these albedo descriptors
by plugging Equation (5) into Equation (6) for _m_ 1 as follows
(same also holds for _m_ 2 and _m_ 3):
_G_ <sup>_<u>R</u>_</sup> <sup>= log</sup> _G_ <sup>_<u>Rxx</u>_</sup> <sup>11</sup>
_m_ 1 = ∆ log _G_ <sup>_<u>R</u>_</sup>
_G_ <sup>_<u>Rxx</u>_</sup> <sup>11</sup> <sup>−</sup> <sup>log</sup> _G_ <sup>_<u>Rxx</u>_</sup> <sup>22</sup>
_G_ <sup>_x_</sup> <sup>2</sup>
= (log _R_ <sup>_x_</sup> <sup>1</sup> - log _G_ <sup>_x_</sup> <sup>1</sup> ) − (log _R_ <sup>_x_</sup> <sup>2</sup> - log _G_ <sup>_x_</sup> <sup>2</sup> )
= ((log _m_ (⃗ _n_,⃗ _l_ )) <sup>_x_</sup> <sup>1</sup> + log _eR_ <sup>_x_</sup> <sup>1</sup>
_R_ <sup>_x_</sup> <sup>1</sup> <sup>) −</sup> <sup>(log</sup> <sup>_m_</sup> <sup>(⃗</sup> <sup>_n_</sup> <sup>,⃗</sup> <sup>_l_</sup> <sup>))</sup> <sup>_x_</sup> <sup>1</sup> <sup>+ log</sup> <sup>_e_</sup> _G_ <sup>_x_</sup> <sup>1</sup>
⃗ _R_ <sup>_x_</sup> <sup>1</sup> <sup>+ log ρ</sup> _R_ <sup>_x_</sup> <sup>1</sup> <sup>⃗</sup>
⃗ <sup>⃗</sup> _G_
+ log ρ _G_ <sup>_x_</sup> <sup>1</sup> <sup>))</sup> <sup>−</sup> <sup>((log</sup> <sup>_m_</sup> <sup>(</sup> <sup>_n_</sup> <sup>⃗</sup> <sup>,⃗</sup> <sup>_l_</sup> <sup>))</sup> <sup>_x_</sup> <sup>2</sup> <sup>+ log</sup> <sup>_e_</sup> _R_ <sup>_x_</sup> <sup>2</sup> <sup>+ log ρ</sup> _R_ <sup>_x_</sup> <sup>2</sup> <sup>) −</sup> <sup>(log</sup> <sup>_m_</sup> <sup>(</sup> <sup>_n_</sup> <sup>⃗</sup> <sup>,⃗</sup> <sup>_l_</sup>
_G_ <sup>_x_</sup> <sup>1</sup> <sup>))</sup> <sup>−</sup> <sup>((log</sup> <sup>_m_</sup> <sup>(</sup> <sup>_n_</sup> <sup>⃗</sup> <sup>,⃗</sup> <sup>_l_</sup> <sup>))</sup> <sup>_x_</sup> <sup>2</sup> <sup>+ log</sup> <sup>_e_</sup> _R_ <sup>_x_</sup> <sup>2</sup>
_R_ <sup>_x_</sup> <sup>2</sup> <sup>) −</sup> <sup>(log</sup> <sup>_m_</sup> <sup>(</sup> <sup>_n_</sup> <sup>⃗</sup> <sup>,⃗</sup> <sup>_l_</sup> <sup>))</sup> <sup>_x_</sup> <sup>2</sup>
<sup>⃗</sup> _R_ <sup>_x_</sup> <sup>2</sup> <sup>+ log ρ</sup> _R_ <sup>_x_</sup> <sup>2</sup> <sup>⃗</sup>
+ log _eG_ <sup>_x_</sup> <sup>2</sup>
_<u>R</u>_
= log <sup>ρ</sup> <sup>_x_</sup> <sup>1</sup>
_G_ <sup>_x_</sup> <sup>2</sup> <sup>+ log ρ</sup> _G_ <sup>_x_</sup> <sup>2</sup>
= ∆ log <sup><u>ρ</u></sup> <sup>_<u>R</u>_</sup>
ρ _G_
_<u>R</u>_
<sup>ρ</sup> <sup>_x_</sup> <sup>1</sup>
ρ _G_ <sup>_<u>x</u>_</sup> <sup>1</sup>
_<u>R</u>_
- log <sup>ρ</sup> <sup>_x_</sup> <sup>2</sup>
,
_G_
_G_ <sup>_x_</sup> <sup>2</sup> <sup>))</sup>
_<u>R</u>_
<sup>ρ</sup> <sup>_x_</sup> <sup>2</sup>
ρ _G_ <sup>_<u>x</u>_</sup> <sup>2</sup>
_G_
_Ic_ = _m_ ( _n_ ⃗,⃗ _l_ )
ω
_fc_ (λ) _e_ (λ) ρ(λ) dλ, (2)
(7)
where the remaining factor is only the albedo difference between two channels. The albedo change is a measure that is
invariant to surface geometry⃗ _n_, illumination direction⃗ _l_, and its
intensity and color _e_ . If there is no albedo change (homogeneously colored patch), then the difference is zero. Sensor artifacts or noise may slightly deviate the value from zero. Therefore, the index can be used to identify regions with constant
albedo. On the other hand, when the difference deviates significantly from zero, it corresponds to a true albedo change. Hence,
this measure encodes spatial information of an image emphasizing on (illumination invariant) albedo edges. Then, we propose
the _albedo gradient index_ as follows:
for three color channels _c_ ∈{ _R_, _G_, _B_ }, where⃗ _n_ indicates the
surface normal,⃗ _l_ denotes the incoming light source direction,
and _m_ is a function of the geometric dependencies (e.g. Lambertian⃗ _n_ ·⃗ _l_ ). Furthermore, λ represents the wavelength, _f_ indicates the camera spectral sensitivity, and _e_ describes the spectral power distribution of the light source. Finally, ρ denotes
the reflectance i.e. the albedo. Then, assuming a linear sensor
response and narrow band filters ( _fc_ (λ _c_ )), the equation can be
simplified as follows:
_Ic_ = _m_ ( _n_ ⃗,⃗ _l_ ) _e_ (λ _c_ ) ρ(λ _c_ ) = _m_ (⃗ _n_,⃗ _l_ ) _ec_ ρ _c_ . (3)
(∆ log _G_ <sup>_<u>R</u>_</sup>
_G_ <sup>_<u>R</u>_</sup> <sup>)2 + (∆</sup> <sup>log</sup> <sup>_<u>R</u>_</sup> _B_
<sup>_<u>R</u>_</sup> _B_ <sup>)2 + (∆</sup> <sup>log</sup> <sup>_<u>G</u>_</sup> _B_
(8)
<sup>_<u>G</u>_</sup> _B_ <sup>)2</sup> <sup>.</sup>
_AGI_ =
Fig. 2. Finding albedo changes (edges) by the use of the albedo gradient index. Brighter values indicate a higher degree of albedo changes. Uniformly
colored patches have low scores. Note the similarity of the albedo gradient
index and the albedo ground-truth image. The _sun_ object shows invariance to geometry and strong shading, and the _raccoon_ object demonstrates
invariance to shadows.
We calculate the albedo gradients over a local neighbourhood
(patch) by using derivative filters (e.g. the derivative of a 2D
Gaussian or Laplacian) to identify the changes. As a result, the
average response of the albedo gradients is calculated. A neighborhood with a higher albedo gradient index value indicates a
stronger albedo change, which is also illustrated in Figure 2.
A patch with a constant index yields the homogeneous regions.
The albedo gradient index is very intuitive and realized in real
time. It is computed for a small threshold to remove possible
problems caused by sensor artifacts and noise.
_3.3._ _Shading Gradients_
So far, we have described that the albedo gradient index can
be used to identify uniformly colored (homogeneous) patches.
In a color image, if the pixel values share the same albedo, then
the only source causing those pixel values to change is the shading component. For constant ρ (satisfying _AGI_ ≈ 0) over an
image neighborhood, the shading gradient can be computed by
taking the difference of the logarithmic transformation of each
color channel. We illustrate it on the red channel as follows
(same also holds for green and blue channels):
_3.4._ _Shading_
After obtaining the shading gradient, we reconstruct the
shading map from its shading gradient fields. We use a publicly available algorithm to compute the global least squares
reconstruction (Harker and O’Leary, 2008, 2011). Note that
the albedo gradient index is used to detect uniformly colored
(homogeneous) patches first. Then, the shading gradients are
calculated only on the homogeneous patches. As a result, the
reconstructed shading map is computed directly from the shading gradient fields of an _RGB_ image in an unsupervised manner.
Since it is computed only on the homogeneous image regions
(satisfying _AGI_ ≈ 0), a sparse shading map is obtained. Therefore, the representation is not affected by the albedo changes.
The process is illustrated in Figure 3. In the end, we can generate a sparse shading map that is directly computed from the
RGB image that is also very close to the ground-truth representation.
Fig. 3. AGI-assisted physics-based shading gradient index. The albedo gradient index is directly computed from the _RGB_ image. Then, it is used to
calculate a shading map by masking out regions that have albedo changes.
The same mask is applied to the shading GT to show the resemblance.
Then, a shading smoothness constraint is used to fill in the
gaps based on the neighboring pixel information. To achieve
that, we adapt a publicly available optimization framework that
is originally designed for the depth completion task (Zhang
and Funkhouser, 2018). We modify the model to impose the
shading smoothness constraint to achieve a full (dense) shading map. The objective function ( _E_ ) is defined as the sum of
squared errors with two terms _E_ = _ED_ + _ES_ as follows:
∆ log _R_ = (log _m_ ( _n_ ⃗,⃗ _l_ ) <sup>_x_</sup> <sup>1</sup> + log _eR_ <sup>_x_</sup> <sup>1</sup>
⃗ _R_ <sup>_x_</sup> <sup>1</sup> <sup>+ log ρ</sup> _R_ <sup>_x_</sup> <sup>1</sup>
⃗ _R_ <sup>_x_</sup> <sup>2</sup> <sup>+ log ρ</sup> _R_ <sup>_x_</sup> <sup>2</sup>
- (log _m_ ( _n_ ⃗,⃗ _l_ ) <sup>_x_</sup> <sup>2</sup> + log _eR_ <sup>_x_</sup> <sup>2</sup>
_R_ <sup>_x_</sup> <sup>1</sup> <sup>)</sup>
_R_ <sup>_x_</sup> <sup>2</sup> <sup>)</sup>
|| _S_ ( _x_ ) − _S_ 0( _x_ )|| <sup>2</sup>,
|| _S_ ( _p_ ) − _S_ ( _q_ )|| <sup>2</sup>,
(9)
_ED_ =
_ES_ =
_x_ ∈ _Tobs_
_p_, _q_ ∈ _N_
= log _m_ (⃗ _n_,⃗ _l_ ) <sup>_x_</sup> <sup>1</sup> - log _m_ ( _n_ ⃗,⃗ _l_ ) <sup>_x_</sup> <sup>2</sup> = ∆ log _m_ ( _n_ ⃗,⃗ _l_ ).
Note that it is only applied on the homogeneous patches. Logarithms are usually preferred to avoid numerical instabilities, yet
note that also the derivatives of the _RGB_ channels can be taken
to yield the following shading gradient index:
(11)
where _Tobs_ denotes the pixels that are available (not empty) in
the initial sparse shading map, which are reconstructed from
the _RGB_ gradient fields over the homogeneous regions, and _N_
denotes a neighbourhood. _ED_ measures the distance between
the final shading map _S_ ( _x_ ) and the initial (sparse) shading map
_S_ 0( _x_ ) at pixel _x_, i.e. per-pixel reconstruction accuracy. Then,
_ES_ encourages adjacent pixels to have the same shading values,
i.e. smoothness.
_SGI_ =
~~�~~ (∆ _R_ ) <sup>2</sup> + (∆ _G_ ) <sup>2</sup> + (∆ _B_ ) <sup>2</sup> . (10)
Similar to the albedo gradient index, the average response is
calculated, which results in representing the gradient field of an
_RGB_ image. Note that (non-colored) shadows are included in
the shading difference component i.e. when _eR_ <sup>_x_</sup> <sup>1</sup> <sup>�</sup> <sup>_e_</sup> _R_ <sup>_x_</sup> <sup>2</sup> <sup>.</sup>
_R_ <sup>_x_</sup> <sup>1</sup> <sup>�</sup> <sup>_e_</sup> _R_ <sup>_x_</sup> <sup>2</sup>
_R_ <sup>_x_</sup> <sup>2</sup> <sup>.</sup>
4. Intrinsic Image Decomposition
Since the sparse shading map is completed by only a smoothness constraint, the reconstructed dense map may suffer from
geometry loss if the initial gaps are too large. It may also suffer
from scale problems due to the least squares fitting. Therefore, we integrate the completed dense shading map into a deep
learning framework to refine it and also to predict the corresponding albedo image to achieve intrinsic image decomposition. The network is expected to further improve the shading
maps by supervised training and also by the differentiation of
additional albedo cues. It is also expected to generate better
albedo maps as the dense shading map is robust to color leakages and intensity ambiguities. As stated earlier, deep learning
based shading estimations are not as good as albedo estimations. They suffer from albedo color leakages mostly due to
texture ambiguities and intensity variations, as demonstrated in
Figure 1. On the other hand, our physics-based generated shading map is more robust to those leakages as it is computed only
on homogeneous regions. As a result, we design a CNN model
such that the _RGB_ image only refines the initial shading estimation, and it is not directly involved in the reconstruction phase to
avoid any further critical color leakage. The model is illustrated
in Figure 4.
Fig. 4. Proposed model architecture. _RGB_ image guides the shading estimation only during the fusion phase using a 1 _x_ 1 convolution and a contextual
attention module (Yu et al., 2018). Shading decoder only receives shading encoder features through skip connections not to be a ff ected by high
resolution _RGB_ color features. Albedo decoder only receives _RGB_ features
through skip connections.
Encoders. Encoder blocks use strided convolution layers for
downsampling (4 times). Each convolution is followed by
residual blocks He et al. (2016). They are preferred as the deviations from the input are rather small. _RGB_ encoder uses 4 consecutive residual blocks, while the shading encoder uses 1 block
with different dilation rates. A residual block is composed of
Batch Norm-ReLu-Conv(3x3) sequence, repeated twice.
Fusion. The final layers of the encoders are fused with a 1 _x_ 1
convolution and a contextual attention module (Yu et al., 2018)
to create a bottleneck such that the related _RGB_ features can
properly guide the shading estimation. As a result, the _RGB_
features are fused with the shading features (1) as a (learnable) weighted combination using a 1 _x_ 1 convolution, and (2)
by the contextual attention module. The contextual attention
module learns where to use feature information from known
background patches to generate missing patches for the image
inpainting task. We adopt their module to our problem such
that the shading features uses the information from the _RGB_
features. It is expected to help as in a homogeneously colored patch, the only source causing pixel values to change is
the shading component, i.e. ∆ _I_ = ∆ _S_ . Therefore, in those
regions, the shading map and the _RGB_ image are highly correlated. Fusion happens at 16 _x_ 16 resolution. Preliminary experiments suggested that lower resolutions (i.e. 8 _x_ 8) cannot reconstruct a decent shading map (too blurry) and higher resolutions
(i.e. 32 _x_ 32) cause further critical color leakages in the shading.
Decoders. The fusion output is fed to the shading decoder,
while the albedo decoder takes _RGB_ encoder’s final layer as
input. Both decoders share the same structure. Encoder features are passed through Conv(3x3)-Batch Norm-LeakyReLu
sequence. Then, the feature maps are (bilinearly) up-sampled
and concatenated with their encoder counterpart by skip connections. The process is repeated 4 times to reach the final
resolution. Shading decoder only receives shading encoder features through skip connections not to be affected by high resolution color features. Albedo decoder only receives _RGB_ features
through skip connections. Therefore, we design a specialized
network for the intrinsic image decomposition task for robust
shading estimation.
Loss Functions. The loss functions used to train the model are
as follows:
L _Albedo_ = λ _A_ 1 L _pixel_ + λ _A_ 2 L _gradient_ + λ _A_ 3 L _dssim_ + λ _A_ 4 L _perceptual_,
(12)
L _S hading_ = λ _S_ 1 L _pixel_ + λ _S_ 2 L _gradient_ + λ _S_ 3 L _dssim_, (13)
L _Total_ = λ _A_ L _Albedo_ + λ _S_ L _S hading_ + λ _I_ L _Image_, (14)
where L _pixel_ is the pixel-wise reconstruction loss, which
is a weighted combination of mean-squared-error loss and
scale-invariant MSE loss, L _gradient_ denotes the gradient-wise
reconstruction loss, L _dssim_ assesses the structural dissimilarity,
L _perceptual_ measures the reconstruction distance in several feature spaces of a pre-trained VGG16 (Simonyan and Zisserman,
2015), L _Image_ is the image formation loss to force that the
estimated reflectance and shading images should reconstruct
the original _RGB_ image (i.e. _I_ = _S_ × _R_ ), and the λs are
the weights. Note that the loss functions are the standard
reconstruction modules and do not impose any intrinsic image
characteristics. The implementation details and other training
details are provided in the supplementary material <sup>1</sup> .
Dataset. To train our models, we use the ShapeNet dataset of
Baslamisli et al. (2018b). The dataset includes around 20,000
(synthetic) images of man-made objects randomly sampled
from the original ShapeNet dataset (Chang et al., 2015).
Following the setup of Baslamisli et al. (2018b), we render
additional images to reach around 50,000 images for training <sup>2</sup> .
1 `[https://drive.google.com/file/d/](https://drive.google.com/file/d/1Bl09bJfDS5KayTyHljmHgAmgV5UcxF4E/view?usp=sharing)`
```
1Bl09bJfDS5KayTyHljmHgAmgV5UcxF4E/view?usp=sharing
```
2The dataset will be made publicly available.
5. Experiments and Evaluation
We conduct experiments on four datasets of real world
objects with ground-truth intrinsics, MIT Intrinsics (Grosse
et al., 2009), NIR-RGB Intrinsics (Cheng et al., 2019), MultiIlluminant Intrinsic Images (Beigpour et al., 2015) and Spectral Intrinsic Images (Chen et al., 2017). In addition, we provide experiments on two scene-level datasets, As Realistic As
Possible (Bonneel et al., 2017) a synthetic ground-truth dataset,
and Intrinsic Images in the Wild (Bell et al., 2014) a real world
complex dataset with relative human annotations. Finally, we
provide further qualitative evaluations on real world in-the-wild
images. Comparisons are provided against several state-of-theart intrinsic image decomposition algorithms. We pick three
optimization based methods: (i) STAR, a structure and texture
aware advanced Retinex model (Xu et al., 2020), (ii) IIW, a
framework based on clustering and a dense CRF (Bell et al.,
2014), and (iii) SIRFS, a model imposing seven different priors on reflectance, shape and illumination (Barron and Malik, 2015). We include four deep learning based methods: (i)
ShapeNet uses specialized decoder links to correlate intrinsics
and is trained on 2.5M synthetic objects (Shi et al., 2017), (ii)
IntrinsicNet uses deep VGG16 encoder-decoders and an image
formation loss, trained on 20K synthetic objects, (iii) RetiNet
provides an end-to-end solution to the Color Retinex approach
using gradients, trained on 20K synthetic objects, (iv) CGIntrinsics combines two real world scenes (around 3000) and two
synthetic scene level datasets (around 20K) for training with
additional smoothness constraints to achieve better intrinsics.
We use the publicly available models and the original outputs
without any fine-tuning or post-processing stages as comparison. To evaluate our proposed method, following the common practice (Grosse et al., 2009), when dense ground-truths
are available, we use the mean squared error (MSE), where the
absolute brightness of each image is adjusted by least squares
as the ground-truth is only defined up to a scale factor and the
local mean squared error (LMSE) with window size 20. For Intrinsic Images in the Wild (IIW) dataset’s human annotations,
we use Weighted Human Disagreement Rate (WHDR) metric
as provided by the authors (Bell et al., 2014). All the images
are resized to 256 × 256 for fair comparison.
_5.1._ _Evaluations on Object-level Datasets_
_5.1.1._ _MIT Intrinsic Images Dataset_
The dataset contains 20 real-world objects with ground-truth
intrinsic images. Objects are lit by a single directional white
light source. We follow the recommendation of the authors
and exclude apple, pear, phone and potato objects as they are
marked as problematic (Grosse et al., 2009). The quantitative
results are provided in Table 1. The table also includes the effect
of the contextual attention (CA) module as an ablation study.
The results show that comparing with the deep learning based
estimations, our proposed models achieves better performance
at generating albedo and shading maps on the dataset. Optimization based SIRFS results are better than all other learning
based models. Its shading estimations yield the best results on
MSE metric. It is known that SIRFS achieves superior performance on single and masked objects, yet it generalize poorly
MSE ↓ LMSE ↓
<u>Shading</u> <u>Albedo</u> <u>Average</u> <u>Shading</u> <u>Albedo</u> <u>Average</u>
<u>STAR</u> <u>0.0114</u> <u>0.0137</u> <u>0.0126</u> <u>0.0672</u> <u>0.0614</u> <u>0.0643</u>
<u>SIRFS</u> <u>0.0066</u> <u>0.0129</u> <u>0.0098</u> <u>0.0309</u> <u>0.0572</u> <u>0.0441</u>
<u>IIW</u> <u>0.0101</u> <u>0.0210</u> <u>0.0156</u> <u>0.0425</u> <u>0.0720</u> <u>0.0573</u>
<u>ShapeNet</u> <u>0.0075</u> <u>0.0158</u> <u>0.0117</u> <u>0.0366</u> <u>0.0543</u> <u>0.0455</u>
<u>IntrinsicNet</u> <u>0.0304</u> <u>0.0104</u> <u>0.0204</u> <u>0.2038</u> <u>0.0854</u> <u>0.1446</u>
<u>RetiNet</u> <u>0.0391</u> <u>0.0097</u> <u>0.0244</u> <u>0.2651</u> <u>0.0636</u> <u>0.1644</u>
<u>CGIntrinsics</u> <u>0.0117</u> <u>0.0133</u> <u>0.0125</u> <u>0.0425</u> <u>0.0477</u> <u>0.0451</u>
<u>OURS</u> <u>0.0069</u> <u>0.0060</u> <u>0.0065</u> <u>0.0418</u> <u>0.0438</u> <u>0.0428</u>
<u>OURS (w/o CA)</u> <u>0.0075</u> <u>0.0070</u> <u>0.0073</u> <u>0.0454</u> <u>0.0458</u> <u>0.0456</u>
Table 1. Quantitative evaluations on MIT Intrinsic Images dataset. Our
proposed model achieves better performance compared against other models on all metrics demonstrating better reconstruction quality. CA module
leads to further improvements in performance.
to real scenes (Narihira et al., 2015; Li and Snavely, 2018a).
Nonetheless, our estimations are superior than SIRFS on all
other metrics. On average, we achieve the best results by a
substantial margin. Furthermore, the contextual attention module by Yu et al. (2018) leads to further performance boost on
all metrics. It emerges as a fundamental building block of our
proposed method.
In addition, we are extremely efficient compared with the
optimization-based methods. To process a single image on MIT
dataset, on average, SIRFS takes 111.38 seconds, whereas our
model takes 1.79 seconds including the albedo gradient estimation, initial shading recovery from the gradients, filling the
initial shading with the smoothness prior, and finally estimating complete intrinsic images. All in all, our model appears 78
times faster than SIRFS. As a side note, IIW model takes 18.09
seconds, and STAR takes 2.78 seconds to process a single image on MIT dataset <sup>3</sup> .
Finally, we provide qualitative evaluations. Figure 5 demonstrates the effect of the proposed model from the initial step
to reach the final shading map with progressive improvement.
The results show that our framework first generates an initial
shading map where the color transitions are masked out by
the physics-based albedo gradient descriptors. Then the initial
shading maps are filled (inpainted/interpolated) with the shading smoothness prior. They are free of color leakages and intensity ambiguities. However, they suffer from scale problems due
to the least squares fitting and they are rather blurry due to the
neighbourhood smoothness filling. Finally, our deep learning
model is able to refine the initially filled shading maps. It makes
them sharper, adjusts the scale, and finer geometry details are
visible. Figure 7 provides the qualitative comparison results
against several state-of-the-art models. It shows that we achieve
better shadow and shading handling in albedo predictions and
our albedo estimations are significantly better. We attribute this
to our physics-based shading reconstructions as it handles color
leakage and intensity ambiguity problems. Thereby, our shading predictions has no or minimum color leakage. Moreover,
the shading map estimations by the deep learning methods tend
to severely overfit to the _RGB_ image producing strong color
leakages as texture artefacts and intensity ambiguities.
3The results are provided on Intel Xeon CPU E5-2640 v3 @ 2.60GHz.
Fig. 5. The e ff ect of the proposed framework. The initial shading maps are
free of the color leakage problem. The filled shadings are rather blurry,
su ff ers from scale problems and missing geometric details. The deep model
further refines it generating sharper shading maps with proper scale.
_5.1.2._ _NIR-RGB Intrinsic Images Dataset_
We provide additional cross dataset experiments on NIRRGB Intrinsic Images dataset, which was mainly generated for
near-infrared imagery research (Cheng et al., 2019). It includes
seven real-world objects with corresponding ground-truth intrinsics. The quantitative results are provided in Table 2.
MSE ↓ LMSE ↓
<u>Shading</u> <u>Albedo</u> <u>Average</u> <u>Shading</u> <u>Albedo</u> <u>Average</u>
<u>STAR</u> <u>0.0028</u> <u>0.0017</u> <u>0.0023</u> <u>0.0896</u> <u>0.1131</u> <u>0.1014</u>
<u>SIRFS</u> <u>0.0020</u> <u>0.0009</u> <u>0.0015</u> <u>0.0806</u> <u>0.0950</u> <u>0.0878</u>
<u>IIW</u> <u>0.0042</u> <u>0.0018</u> <u>0.0030</u> <u>0.1200</u> <u>0.1345</u> <u>0.1273</u>
<u>ShapeNet</u> <u>0.0019</u> <u>0.0008</u> <u>0.0014</u> <u>0.0701</u> <u>0.0772</u> <u>0.0737</u>
<u>IntrinsicNet</u> <u>0.0021</u> <u>0.0011</u> <u>0.0016</u> <u>0.0748</u> <u>0.0927</u> <u>0.0838</u>
<u>RetiNet</u> <u>0.0028</u> <u>0.0013</u> <u>0.0021</u> <u>0.0959</u> <u>0.1136</u> <u>0.1048</u>
<u>CGIntrinsics</u> <u>0.0027</u> <u>0.0009</u> <u>0.0018</u> <u>0.0862</u> <u>0.0797</u> <u>0.0830</u>
<u>OURS</u> <u>0.0017</u> <u>0.0006</u> <u>0.0012</u> <u>0.0689</u> <u>0.0609</u> <u>0.0649</u>
Table 2. Quantitative evaluations on NIR-RGB Intrinsic Images dataset.
Our proposed model achieves better performance compared against other
models on all metrics demonstrating better generalization ability.
The results show that our proposed model achieves better
performance compared against other models on all metrics. We
especially achieve significantly better albedo estimations. The
results further demonstrate the improved generalization ability
of our proposed method. In this dataset, deep learning based
methods are as good as SIRFS, even more superior in some
cases. Finally, Figure 6 shows qualitative comparisons for a
number of images.
The qualitative results further support the quantitative evaluations. Our model predictions are closer to the ground-truth
Fig. 6. Qualitative evaluations on NIR-RGB Intrinsic Images dataset. Our
albedo maps appear more natural and vivid, and closer to the chromaticity patterns of the input images. Our shading estimations do not include
intensity ambiguities or texture artefacts.
images. The colors of our albedo estimations appear more natural and vivid, and closer to the chromaticity patterns of the
input images. Our shading estimations do not include intensity
ambiguities or texture artefacts. On the other hand, the intensity ambiguity problem in the shading maps can be observed
on ShapeNet and IntrinsicNet estimations on the _candle_ and
_house_ images. CGIntrinsics’s shading smoothness constraint
tends to generate over-smoothed estimations and cannot capture fine-grained geometric patterns. For example, the balcony
of the _house_ object is not visible anymore. SIRFS tends to generate incorrect colors on albedo estimations when a scene is
dominated by a single color as in the cases of _lion_ and _house_
objects. The colors of the CGIntrinsics albedo maps tend to
shift towards red.
_5.1.3._ _Multi-Illuminant Intrinsic Images (MIII) Dataset_
MIT Intrinsic Images and NIR-RGB Intrinsic Images
datasets provide images with uniform white illumination. In
this experiment, we further test the ability of our proposed
method to generalize also to complex multi-illuminant scenarios. The dataset includes five real-world scenes with multicolored non-uniform lighting, complex geometry, large specularities, and challenging colored shadows (Beigpour et al.,
2015). Each scene includes two objects and illuminated with
6 single-illuminant and 9 two-illuminants. The colors of the
illuminants vary from orange to blue. In total, there are 75 images with ground-truth intrinsics. The quantitative results are
provided in Table 3.
The qualitative results show that our proposed model
achieves better performance on almost all metrics. Only the reflectance estimations of CGIntrinsics (Li and Snavely, 2018a)
are better on the LMSE metric, but their shading estimations
are significantly worse. Thus, compared with other works, on
average we achieve the best results by a large margin. Note
that optimization based SIRFS (Barron and Malik, 2015) and
Fig. 7. Comparisons with state-of-the-art models. Our shading predictions are more robust to the color leakage problem, while all other methods tend to
overfit to the _RGB_ image having severe color leakages in the shading maps. We also achieve significantly better albedo estimations. (Best viewed in digital
format.)
MSE ↓ LMSE ↓
<u>Shading</u> <u>Albedo</u> <u>Average</u> <u>Shading</u> <u>Albedo</u> <u>Average</u>
<u>STAR</u> <u>0.0021</u> <u>0.0023</u> <u>0.0022</u> <u>0.0817</u> <u>0.1350</u> <u>0.1084</u>
<u>SIRFS</u> <u>0.0003</u> <u>0.0003</u> <u>0.0003</u> <u>0.1015</u> <u>0.1417</u> <u>0.1216</u>
<u>IIW</u> <u>0.0003</u> <u>0.0002</u> <u>0.0003</u> <u>0.0869</u> <u>0.1286</u> <u>0.1078</u>
<u>ShapeNet</u> <u>0.0002</u> <u>0.0002</u> <u>0.0002</u> <u>0.0846</u> <u>0.1020</u> <u>0.0933</u>
<u>IntrinsicNet</u> <u>0.0002</u> <u>0.0002</u> <u>0.0002</u> <u>0.0597</u> <u>0.0873</u> <u>0.0735</u>
<u>RetiNet</u> <u>0.0002</u> <u>0.0002</u> <u>0.0002</u> <u>0.0590</u> <u>0.0964</u> <u>0.0777</u>
<u>CGIntrinsics</u> <u>0.0004</u> <u>0.0001</u> <u>0.0003</u> <u>0.1172</u> <u>0.0707</u> <u>0.0940</u>
<u>OURS</u> <u>0.0002</u> <u>0.0001</u> <u>0.0002</u> <u>0.0514</u> <u>0.0770</u> <u>0.0642</u>
Table 3. Quantitative evaluations on MIII dataset with multi-colored nonuniform lighting. Our proposed model achieves better performance and is
more robust to multi-colored non-uniform lighting.
learning based ShapeNet (Shi et al., 2017) are inherently modelled to estimate multi-colored illumination. Nevertheless, our
model emerges more robust to real-world images with multicolored non-uniform lighting. The results further demonstrate
the improved generalization ability of our proposed method.
_5.1.4._ _Spectral Intrinsic Images Dataset (SIID)_
The dataset was mainly generated for spectral intrinsic image
decomposition research (Chen et al., 2017). It includes nine objects illuminated with two kinds of light sources, one white and
one warm-tone white. In total, it has 18 spectral images with
corresponding shading ground-truths. The dataset also provides
corresponding _RGB_ images synthesized from the spectral images that are used as inputs to the models. The quantitative
results are provided in Table 4.
<u>MSE-s</u> <u>↓</u> <u>LMSE-s</u> <u>↓</u>
<u>STAR</u> <u>0.0034</u> <u>0.0192</u>
<u>SIRFS</u> <u>0.0186</u> <u>0.0215</u>
<u>IIW</u> <u>0.0064</u> <u>0.0164</u>
<u>ShapeNet</u> <u>0.0129</u> <u>0.0424</u>
<u>IntrinsicNet</u> <u>0.0045</u> <u>0.0189</u>
<u>RetiNet</u> <u>0.0047</u> <u>0.0220</u>
<u>CGIntrinsics</u> <u>0.0142</u> <u>0.0286</u>
<u>OURS</u> <u>0.0027</u> <u>0.0156</u>
Table 4. Quantitative evaluations on SIID dataset with white and warmtone white illuminations. Our proposed model achieves better performance and has better generalization ability.
The results show that the reconstruction quality of our shading maps are closer to the ground-truths on all metrics. Similar
to the MIII dataset experiments with multi-colored non-uniform
lighting, our models also achieve more robust results on a different illumination setting of warm-tone white. Finally, Figure 8
shows qualitative comparisons for a number of images.
The qualitative results further support the quantitative evaluations. Our model predictions are closer to the ground-truth
images. Our albedo estimations appear more natural and vivid
and they are free of geometric effects. Our model is also capable of removing shadows casts on the platforms of the _gypsum_
and _cube_ objects from the albedo estimations. Since our model
is trained only on white light, the color of the light source is
also embedded in the albedo. Same behaviour is also observed
on other models. To overcome this issue, a white balancing al
Fig. 8. Qualitative evaluations on SIID. Our albedo maps appear more natural and vivid. Our shading estimations do not include intensity ambiguities or texture artefacts and are closer to the ground-truths.
gorithm can be applied to the input images as a pre-processing
step. Nonetheless, it does not cause significant problems on the
reconstruction quality as the ground-truths are not absolute and
only defined up to a scale factor (Grosse et al., 2009; Narihira
et al., 2015). SIRFS can handle the issue, but it tends to confuse
albedo and color of the light source when a scene is dominated
by a single color as demonstrated in the previous section. Additional examples can be found in the upcoming sections. Likewise, as mentioned in the previous section, ShapeNet (Shi et al.,
2017) is inherently modelled to estimate multi-colored illumination. However, it also fails to differentiate the color of the
light source and albedo in this case. It also generates undesired
color artefacts on the albedo maps.
As for the shading map generations, our model estimations
are free of any texture artefacts and intensity ambiguities. The
text on the heart of the _baymax_ object is correctly attributed to
the albedo map, whereas ShapeNet estimation is contaminated
with the texture artefact, and IntrinsicNet and CGIntrinsics estimations both contain texture artefacts and intensity ambiguities.
The intensity ambiguity problem is more severe on the shading
estimations of the _cube_ object. Our model and optimizationbased SIRFS can handle those. Nevertheless, our contribution
is more significant on the _gypsum_ object, where SIRFS tend to
generate over-smooth and overly-bright estimations that the geometry is distorted and fine-grained structures are not visible
anymore. Our model is also not flawless. For example, we cannot capture the fine geometric details of the _cube_ image and our
estimation appears more rigid. That is because of the shading
smoothness constraint that is used to fill in the gaps of the initial
shading map based on the neighboring pixel information. Since
the color changes happen near the holes, shading smoothness
interpolation also fills in those gaps. Therefore, the shading estimation appears more rigid in those cases.
_5.1.5._ _Amsterdam Library of Object Images (ALOI) Dataset_
We also provide additional visual comparisons for real world
images without ground-truths. For the task, we use Amsterdam
Fig. 9. Additional real world evaluations on ALOI dataset. Rows (1,2,3)
provide examples with textures, and (4,5) with strong shading patterns.
Deep learning methods have severe color leakages in the shading maps and
cannot handle strong shadings in the albedo maps. Our method is capable
of capturing decent albedo and shading maps for also ALOI images.
Library of Object Images (ALOI) dataset (J. M. Geusebroek
and Smeulders, 2005). Figure 9 provides a number of example objects with different properties to demonstrate the effectiveness of our method. Rows (1,2,3) provide examples with
textures and rows (4,5) provides examples with strong shading
patterns.
Deep learning based methods have severe color leakages in
the shading map estimations for textured objects. CGIntrinsics’s shading smoothness constrain negatively effects the shading maps when strong shading patterns are present. It generates homogeneously smooth images such that it cannot properly
capture darker regions where the surface normals (geometry)
significantly deviate from the incoming light source direction.
It can be observed from the _cup_ image that the right part of
the handle should be covered by the shading pattern and should
not be visible. Our proposed work is the only model that can
capture that pattern. Similar behaviour is also observed for the
_wooden cube_ in the last row. Likewise, the other models cannot
generate a decent albedo map in those cases. ShapeNet generated albedo maps are rather dull colored and blurry. Similarly,
CGIntrinsics and IntrinsicNet generated albedo maps tend to
be polluted with color artefacts. On the other hand, our model
is better at avoiding attributing surface texture to the shading
maps, and our albedo estimations are sharper, have better color
augmentation and more natural for all cases. SIRFS model is
capable of producing decent shading maps for textured objects,
as well. However, its albedo predictions are not as decent when
an image is dominated by a single color as in the case of 1st
and 5th rows. Similarly, it tends to fail to capture decent shading maps when an image has strong shading patterns.
_5.2._ _Evaluations on Scene-level Datasets_
There are several aspects that are challenging for our current
setup for the scene level intrinsic image decomposition. Firstly,
a scene is composed of multiple objects so that the behaviour
of the illumination component is more complex. Especially, the
ambient light (inter-reflection) effect is way stronger. In addition, our optimization process using the smoothness constraint
to fill in the gaps of the initial shading map may be negatively
effected if the gaps are filled from different surfaces (e.g. filled
with object boundaries). Similarly, cluttered objects may cause
way too large gaps to fill. Another thing is that since scene level
objects have different scales, one single threshold might not be
sufficient to obtain proper gradients. Nonetheless, for the sake
of completeness, we also evaluate our model on scene-level images to provide additional insights.
_5.2.1._ _As Realistic As Possible (ARAP) Dataset_
With the current technology, it is not possible to generate
dense ground-truth intrinsic images for any real world scene.
Collecting the ground-truth intrinsics happens only on objectlevel and in a fully-controlled (indoor) laboratory settings,
which demands extreme care (Grosse et al., 2009; Chen et al.,
2017; Cheng et al., 2019). That is the reason why those datasets
are small sampled. Therefore, to evaluate our model on scenelevel images, we utilize the synthetic dataset of Bonneel et al.
(2017). The dataset provides 53 high quality realistic scenelevel renderings with corresponding per-pixel ground-truth intrinsics. Some of the scenes were re-rendered with different
illumination settings. Thus, the evaluation is provided for the
full dataset of 152 images. The quantitative results are provided
in Table 5. The evaluations do not include CGIntrinsics model
as it uses ARAP for training (Li and Snavely, 2018a), and also
SIRFS model as it is specifically designed for single objects and
generalize poorly to real scenes (Narihira et al., 2015; Li and
Snavely, 2018a). Compared with other frameworks our proposed model achieves better performance on all metrics also on
scene-level images, which further demonstrates our improved
generalization ability.
_5.2.2._ _Intrinsic Images in the Wild (IIW) Dataset_
We follow the common practice and utilize the test set used
by previous work (Zhou et al., 2015; Li and Snavely, 2018a).
The test split includes 1046 images with relative human annotations. The quantitative results are provided in Table 6. We
also train our model with less data (20K) to provide a more fair
comparison against the models of Baslamisli et al. (2018b).
MSE ↓ LMSE ↓
<u>Shading</u> <u>Albedo</u> <u>Average</u> <u>Shading</u> <u>Albedo</u> <u>Average</u>
<u>IIW</u> <u>0.0913</u> <u>0.0496</u> <u>0.0705</u> <u>0.2050</u> <u>0.0721</u> <u>0.1386</u>
<u>ShapeNet</u> <u>0.1218</u> <u>0.0978</u> <u>0.1098</u> <u>0.2400</u> <u>0.1435</u> <u>0.1918</u>
<u>IntrinsicNet</u> <u>0.0889</u> <u>0.0380</u> <u>0.0635</u> <u>0.1867</u> <u>0.0530</u> <u>0.1199</u>
<u>RetiNet</u> <u>0.0874</u> <u>0.0417</u> <u>0.0646</u> <u>0.1875</u> <u>0.0600</u> <u>0.1238</u>
<u>OURS</u> <u>0.0862</u> <u>0.0337</u> <u>0.0600</u> <u>0.1832</u> <u>0.0482</u> <u>0.1157</u>
Table 5. Quantitative evaluations on scene-level ARAP dataset. Our proposed model achieves better performance and generalization ability.
<u>Training set</u> <u>WHDR</u> <u>↓</u>
<u>STAR</u> <u>-</u> <u>32.9%</u>
<u>IIW</u> <u>-</u> <u>20.6%</u>
<u>DirectIntrinsics</u> <u>Sintel</u> <u>37.3%</u>
<u>CGIntrinsics</u> <u>SUNCG</u> <u>26.1%</u>
<u>CGIntrinsics</u> <u>CGI</u> <u>18.4%</u>
<u>ShapeNet</u> <u>ShapeNet (2.5 M)</u> <u>59.4%</u>
<u>IntrinsicNet</u> <u>ShapeNet (50 K)</u> <u>32.1%</u>
<u>RetiNet</u> <u>ShapeNet (50 K)</u> <u>37.9%</u>
<u>OURS</u> <u>ShapeNet (20 K)</u> <u>28.7%</u>
<u>OURS</u> <u>ShapeNet (50 K)</u> <u>28.9%</u>
<u>OURS*</u> <u>ShapeNet (50 K)</u> <u>26.8%</u>
Table 6. Quantitative evaluations on IIW dataset with human annotations.
Our proposed model achieve significantly better reflectance predictions
among the models trained on object-level ShapeNet dataset. ∗ indicates
that the CNN predictions are post-processed with a guided filter.
Comparing with the models trained on object-level ShapeNet
dataset, our proposed model achieve significantly better reflectance predictions. Additional performance boost is achieved
by applying a post processing step to enforce piecewise constant reflectance (Nestmeyer and Gehler, 2017). Decreasing
the training sample size does not significantly effect the performance for our model’s albedo estimations on IIW. Furthermore,
our proposed model is significantly better than the structure
and texture aware advanced Retinex model, and also DirectIntrinsics model trained on scene-level Sintel dataset. We also
achieve on par results with CGIntrinsics model when trained on
scene-level SUNCG dataset. The model achieves superior performance by combining the refined and improved renderings
of scene-level SUNCG and the integration of ARAP dataset to
create their final dataset CGI. It is also worthwhile to note that
all the learning based models use data augmentations through
random flips, shifts, resizings, and crops, whereas we do not
apply any augmentation technique. Finally, Figure 11 provides
qualitative comparisons for albedo estimations, and Figure 10
for shading estimations.
ShapeNet estimations are contaminated with artefacts and do
not appear natural. The shading of the _bed_ image includes texture artefacts and the text _AWAI_ is directly copied to the shading map in the _girl_ image. Similar patterns are also observed in
IntrinsicNet estimations. IntrinsicNet generated shading maps
also suffer from intensity ambiguities, which can be observed
from the _girl_ image that the neck of of the t-shirt has a darker
color. Its albedo estimations are better than ShapeNet’s, yet
they contain inconvenient brightness artefacts. IIW’s albedo estimations appear natural and free of geometry effects. However,
its shading generations directly overfit to the _RGB_ inputs, and
all the texture patterns are clearly visible in the shading maps.
Fig. 10. Shading evaluations on IIW. Our model can produce scene-level
shading maps that are free of texture or intensity ambiguities. Other models tend to overfit to the RGB images.
CGIntrinsics trained on scene-level imagery achieves decent
albedo predictions with proper smoothing effects, and compared with others, they appear more natural. However, their
shading estimations appear way too smooth and hazy and most
of the structures are not visible anymore, see the stairs or the
fine-grained pillars of the church. It also suffers from the same
intensity ambiguity problem as IntrinsicNet. On the other hand,
our model is also capable of producing scene-level shading
maps that are free of texture or intensity ambiguities. The first
image shows that our model also works on outdoor scenes capable of handling geometry differences and different light properties. We can also handle the text on the t-shirt of the _girl_ image and the text on the _salt box_ and correctly attribute them to
albedo maps. The windows of the _bed_ image are an example
where our shading map is negatively effected as our model tries
fill in the gaps with insufficient gradient information. Although
we did not enforce it as CGIntrinsics, our albedo estimations
also appear smooth. However, our method still makes mistakes,
such as the face of the _girl_ or right side of the _church_ appear
blurry. Finally, our model is the only one that can handle the
strong shadow cast under the bed. Our albedo estimations are
free of strong shadow casts in this example, whereas all other
models fail to handle it.
6. Conclusion
We investigated the use of photometric invariance to steer a
deep learning model for intrinsic image decomposition (albedo
and shading). We proposed albedo and shading gradient descriptors which are derived from physics-based models. Using
the descriptors, albedo transitions are masked out and an initial shading map is calculated directly from the corresponding
_RGB_ image gradients in a learning-free unsupervised manner.
Then, an optimization method was proposed to reconstruct the
full dense shading map. Finally, we integrated the generated
shading map into a novel deep learning framework to refine it
and also to predict corresponding albedo image to achieve intrinsic image decomposition. Additionally, to train our model,
a large-scale dataset of synthetic images of man-made objects
was extended from 20K to 50K.
The evaluations were provided on five different object-level
datasets (MIT, NIR-RGB, MIII, SIID, and ALOI), and two
scene-level datasets (ARAP and IIW) with comprehensive setups without any fine-tuning or domain adaptation stage. The
evaluations proved that our proposed model generated shading
maps are more robust to texture artefacts and intensity ambiguities, which has been a long standing problem in the intrinsic image decomposition task. Since our model handles the undesired
artefacts in the shading estimations, we also better differentiate
albedo changes and achieve superior quantitative results.
Another conclusion is that deep learning based methods tend
to overfit to the _RGB_ image having critical color leakages in
the shading maps. When quantitatively evaluating, the leakage effect may not be reflected numerically. That suggests that
future work should focus on proposing better metrics for evaluation. In addition, the color leakage effect may not be observed
when a model is trained and tested (or fine-tuned) on the same
dataset (Narihira et al., 2015; Cheng et al., 2018). Therefore, it
is important for intrinsic image decomposition methods to provide cross-dataset or in-the-wild evaluations. Finally, we also
tried to adapt several guided image-to-image translation and
feature modulation techniques for our preliminary experiments
to refine our initial shading maps with the _RGB_ features. In
particular, we tried the end-to-end trainable guided filter by Wu
et al. (2018), bi-directional guided image-to-image translation
by B. AlBahar (2019), spatially-adaptive normalization by Park
Fig. 11. Albedo evaluations on IIW. Our model can generate proper scenelevel albedo maps. We can also handle strong shadow casts.
et al. (2019), and deep spatial feature transform by Wang et al.
(2018). Unfortunately, none of them were able to address the
color leakage problem in the shading maps.
Acknowledgments
This project was funded by the EU Horizon 2020 program
No. 688007 (TrimBot2020). We thank Partha Das for his contribution to the experiments.
References
B. AlBahar, J.B.H., 2019. Guided image-to-image translation with bidirectional feature transformation. IEEE International Conference on Computer Vision .
Barnard, K., Finlayson, G.D., 2000. Shadow identification using colour ratios,
in: Color and Imaging Conference.
Barron, J.T., Malik, J., 2015. Shape, illumination, and reflectance from shading.
IEEE Trans. on Pattern Analysis and Machine Intelligence, 1670–1687.
Barrow, H.G., Tenenbaum, J.M., 1978. Recovering intrinsic scene characteris
tics from images. Computer Vision Systems, 3–26.
Baslamisli, A.S., Das, P., Le, H.A., Karaoglu, S., Gevers, T., 2019. Shadingnet:
Image intrinsics by fine-grained shading decomposition, in: arXiv preprint
arXiv:1912.04023v2.
Baslamisli, A.S., Groenestege, T.T., Das, P., Le, H.A., Karaoglu, S., Gevers,
T., 2018a. Joint learning of intrinsic images and semantic segmentation, in:
European Conference on Computer Vision.
Baslamisli, A.S., Le, H.A., Gevers, T., 2018b. Cnn based learning using reflec
tion and retinex models for intrinsic image decomposition, in: IEEE Conference on Computer Vision and Pattern Recognition.
Beigpour, S., Kolb, A., Kunz, S., 2015. A comprehensive multi-illuminant
dataset for benchmarking of intrinsic image algorithms, in: IEEE International Conference on Computer Vision.
Bell, S., Bala, K., Snavely, N., 2014. Intrinsic images in the wild. ACM Trans
actions on Graphics .
Bonneel, N., Kovacs, B., Paris, S., Bala, K., 2017. Intrinsic decompositions for
image editing. Computer Graphics Forum (Eurographics State of The Art
Report) .
Bousseau, A., Paris, S., Durand, F., 2009. User-assisted intrinsic images. ACM
Transations on Graphics .
Chang, A.X., Funkhouser, T., Guibas, L., Hanrahan, P., Huang, Q., Li, Z.,
Savarese, S., Savva, M., Song, S., Su, H., Xiao, J., Yi, L., Yu, F., 2015.
ShapeNet: An Information-Rich 3D Model Repository. Technical Report.
Stanford University — Princeton University — Toyota Technological Institute at Chicago.
Chen, X., Zhu, W., Zhao, Y., Yu, Y., Zhou, Y., Yue, T., Du, S., Cao, X., 2017. In
trinsic decomposition from a single spectral image. Applied Optics, 5676–
5684.
Cheng, L., Zhang, C., Liao, Z., 2018. Intrinsic image transformation via scale
space decomposition, in: IEEE Conference on Computer Vision and Pattern
Recognition.
Cheng, Z., Zheng, Y., You, S., Sato, I., 2019. Non-local intrinsic decomposition
with near-infrared priors, in: IEEE International Conference on Computer
Vision.
Drew, M.S., Wei, J., Li, Z.N., 1998. Illumination-invariant color object recog
nition via compressed chromaticity histograms of color-channel-normalized
images, in: IEEE International Conference on Computer Vision.
Fan, Q., Yang, J., Hua, G., Chen, B., Wipf, D., 2018. Revisiting deep intrin
sic image decompositions, in: IEEE Conference on Computer Vision and
Pattern Recognition.
Finlayson, G.D., 1992. Colour Object Recognition. Master’s thesis. Simon
Fraser University.
Finlayson, G.D., Chatterjee, S.S., Funt, B.V., 1998. Color angle invariants for
object recognition, in: Color and Imaging Conference.
Finlayson, G.D., Hordley, S.D., Lu, C., Drew, M.S., 2006. On the removal of
shadows from images. IEEE Transactions On Pattern Analysis and Machine
Intelligence, 59–68.
Gehler, P.V., Rother, C., Kiefel, M., Zhang, L., Schlkopf, B., 2011. Recovering
intrinsic images with a global sparsity prior on reflectance, in: Advances in
Neural Information Processing Systems.
Gevers, T., Smeulders, A., 1997. Object recognition based on photometric color
invariants, in: Scandinavian Conference on Image Analysis.
Gevers, T., Smeulders, A., 1998. Image indexing using composite color and
shape invariant features, in: IEEE International Conference on Computer
Vision.
Gevers, T., Smeulders, A., 2000. Pictoseek: Combining color and shape invari
ant features for image retrieval. IEEE Transactions on Image Processing,
102–119.
Gevers, T., Smeulders, A., 2001. Color constant ratio gradients for image seg
mentation and similarity of texture objects, in: IEEE Conference on Computer Vision and Pattern Recognition.
Grosse, R., Johnson, M.K., Adelson, E.H., Freeman, W.T., 2009. Ground truth
dataset and baseline evaluations for intrinsic image algorithms, in: IEEE
International Conference on Computer Vision.
Harker, M., O’Leary, P., 2008. Least squares surface reconstruction from mea
sured gradient fields, in: IEEE Conference on Computer Vision and Pattern
Recognition.
Harker, M., O’Leary, P., 2011. Least squares surface reconstruction from gra
dients: Direct algebraic methods with spectral, Tikhonov, and constrained
regularization, in: IEEE Conference on Computer Vision and Pattern Recognition.
He, K., Zhang, X., Ren, S., Sun, J., 2016. Deep residual learning for image
recognition, in: IEEE Conference on Computer Vision and Pattern Recognition.
J. M. Geusebroek, G.J.B., Smeulders, A., 2005. The amsterdam library of
object images. International Journal of Computer Vision, 103–112.
Janner, M., Wu, J., Kulkarni, T.D., Yildirim, I., Tenenbaum, J.B., 2017. Self
supervised intrinsic image decomposition, in: Advances in Neural Information Processing Systems.
Land, E.H., McCann, J.J., 1971. Lightness and retinex theory. Journal of
Optical Society of America, 1–11.
Lettry, L., Vanhoey, K., van Gool, L., 2018a. Darn: a deep adversarial residual
network for intrinsic image decomposition, in: IEEE Winter Conference on
Applications of Computer Vision.
Lettry, L., Vanhoey, K., van Gool, L., 2018b. Unsupervised deep single-image
intrinsic decomposition using illumination-varying image sequences, in: International Pacific Conference on Computer Graphics and Applications.
Li, Z., Shafiei, M., Ramamoorthi, R., Sunkavalli, K., Chandraker, M., 2020. In
verse rendering for complex indoor scenes: Shape, spatially-varying lighting
and svbrdf from a single image, in: IEEE Conference on Computer Vision
and Pattern Recognition.
Li, Z., Snavely, N., 2018a. Cgintrinsics: Better intrinsic image decomposition
through physically-based rendering, in: European Conference on Computer
Vision.
Li, Z., Snavely, N., 2018b. Learning intrinsic image decomposition from watch
ing the world, in: IEEE Conference on Computer Vision and Pattern Recognition.
Matas, J., Marik, R., Kittler, J., 1995. On representation and matching of multi
coloured objects, in: IEEE International Conference on Computer Vision.
Matsushita, Y., Lin, S., Kang, S.B., Shum, H.Y., 2004. Estimating intrinsic
images from image sequences with biased illumination, in: European Conference on Computer Vision.
Narihira, T., Maire, M., Yu, S.X., 2015. Direct intrinsics: Learning albedo
shading decomposition by convolutional regression, in: IEEE International
Conference on Computer Vision.
Nayar, S.K., Bolle, R.M., 1996. Reflectance based object recognition. Interna
tional Journal of Computer Vision, 219–240.
Nestmeyer, T., Gehler, P.V., 2017. Reflectance adaptive filtering improves in
trinsic image estimation, in: IEEE Conference on Computer Vision and Pattern Recognition.
Park, T., Liu, M.Y., Wang, T.C., Zhu, J.Y., 2019. Semantic image synthesis with
spatially-adaptive normalization, in: IEEE Conference on Computer Vision
and Pattern Recognition.
van de Sande, K., Gevers, T., Snoek, C., 2009. Evaluating color descriptors for
object and scene recognition. IEEE Trans. on Pattern Analysis and Machine
Intelligence, 1582–1596.
Sengupta, S., Gu, J., Kim, K., Liu, G., Jacobs, D.W., Kautz, J., 2019. Neural
inverse rendering of an indoor scene from a single image, in: IEEE International Conference on Computer Vision.
Shafer, S., 1985. Using color to separate reflection components. Color research
and applications, 210–218.
Shen, J., Yang, X., Jia, Y., Li, X., 2011. Intrinsic images using optimization, in:
IEEE Conference on Computer Vision and Pattern Recognition.
Shen, L., Tan, P., Lin, S., 2008. Intrinsic image decomposition with non-local
texture cues, in: IEEE Conference on Computer Vision and Pattern Recognition.
Shen, L., Yang, X., Li, X., Jia, Y., 2013. Intrinsic image decomposition using
optimization and user scribbles. IEEE Transactions on Cybernetics, 425–
436.
Shi, J., Dong, Y., Su, H., Yu, S.X., 2017. Learning non-lambertian object intrin
sics across shapenet categories, in: IEEE Conference on Computer Vision
and Pattern Recognition.
Shu, Z., Yumer, E., Hadap, S., Sunkavalli, K., Shechtman, E., Samaras, D.,
2017. Neural face editing with intrinsic image disentangling, in: IEEE Con
ference on Computer Vision and Pattern Recognition.
Simonyan, K., Zisserman, A., 2015. Very deep convolutional networks for
large-scale image recognition, in: International Conference on Learning
Representations.
Stricker, M.A., 1992. Color and Geometry as Cues for Indexing. Technical
Report. University of Chicago Chicago, IL, USA.
Wang, X., Yu, K., Dong, C., Loy, C.C., 2018. Recovering realistic texture in
image super-resolution by deep spatial feature transform, in: IEEE Conference on Computer Vision and Pattern Recognition.
Weiss, Y., 2001. Deriving intrinsic images from image sequences, in: IEEE
International Conference on Computer Vision.
Wu, H., Zheng, S., Zhang, J., Huang, K., 2018. Fast end-to-end trainable guided
filter, in: IEEE Conference on Computer Vision and Pattern Recognition.
Xu, J., Hou, Y., Ren, D., Liu, L., Zhu, F., Yu, M., Wang, H., Shao, L., 2020.
Star: A structure and texture aware retinex model. IEEE Transactions on
Image Processing, 5022–5037.
Ye, G., Garces, E., Liu, Y., Dai, Q., Gutierrez, D., 2014. Intrinsic video and
applications, in: ACM Trans. on Graphics (SIGGRAPH).
Yu, J., Lin, Z., Yang, J., Shen, X., Lu, X., Huang, T.S., 2018. Generative im
age inpainting with contextual attention, in: IEEE Conference on Computer
Vision and Pattern Recognition.
Zhang, Y., Funkhouser, T., 2018. Deep depth completion of a single rgb-d
image, in: IEEE Conference on Computer Vision and Pattern Recognition.
Zhou, H., Yu, X., Jacobs, D.W., 2019. Glosh: Global-local spherical harmonics
for intrinsic image decomposition, in: IEEE International Conference on
Computer Vision.
Zhou, T., Krahenbuhl, P., Efros, A.A., 2015. Learning data-driven reflectance
priors for intrinsic image decomposition. IEEE International Conference on
Computer Vision .