SGformer: Boosting transformers for indoor lighting estimation from a single image
필름·전자재료 · (13) 프리즘 필름
기본 정보
- 저자
- DOI
- 10.1007/s41095-024-0447-8
- 저널
- Computational Visual Media
- 발행년도
- 2024
- 발행기관
- Springer Nature
- 피인용수
- 4
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1007/s41095-024-0447-8
- 토픽
- Color Science and Applications
- OpenAlex ID
- W4401756189
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (13) 프리즘 필름
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > 프리즘 필름' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
본문 42,077자
본문 펼치기
섹션 본문 62문단 · 40,873자
(제목 없음)
1Estimating lighting from standard images can effectively circumvent the need for resourceintensive high-dynamic-range (HDR) lighting acquisition.However, this task is often ill-posed and challenging, particularly for indoor scenes, due to the intricacy and ambiguity inherent in various indoor illumination sources.We propose an innovative transformer-based method called SGformer for lighting estimation through modeling spherical Gaussian (SG) distributionsa compact yet expressive lighting representation.Diverging from previous approaches, we explore underlying local and global dependencies in lighting features, which are crucial for reliable lighting estimation.Additionally, we investigate the structural relationships spanning various resolutions of SG distributions, ranging from sparse to dense, aiming to enhance structural consistency and curtail potential stochastic noise stemming from independent SG component regressions.By harnessing the synergy of local-global lighting representation learning and incorporating consistency constraints from various SG resolutions, the proposed method yields more accurate lighting estimates, allowing for more realistic lighting effects in object relighting and composition.Our code and model implementing our work can be found at https://github.com/junhong-jennifer-zhao/SGformer.
Introduction
2In today's world of gaming, digital effects, and surging popularity of augmented and mixed reality (AR/MR) applications, there is a growing demand for more realistic lighting.Achieving this realism is essential to ensure consistent shading and shadow alignment between virtual and real objects.Traditionally, capturing a scene's lighting involves using light probes or omnidirectional 360 • capture devices.However, the use of specialized devices is time-consuming and often cost-prohibitive, forming barriers to their widespread use.Recent advances in deep learning techniques [1][2][3] and the availability of extensive lightingrelated datasets have prompted the development of methods to overcome these limitations by estimating global illumination from standard partial field-of-view images, providing a more accessible and cost-effective approach to approximate lighting [4][5][6].
3The challenge of estimating indoor scene lighting, where numbers of lighting sources, their distribution, and their intrinsic properties may vary significantly between scenes, is widely recognized.Various deep learning methods tackle this challenge by generating indoor lighting conditions using different lighting representations, including environment maps or regressing lighting parameters like spherical harmonics (SH) and spherical Gaussians (SG).In contrast to environment maps, which provide dense pixel-level representations, parametric lighting models offer condensed lighting representations focusing on the distribution of key lighting sources, making them preferred for real-time rendering and relighting applications [7][8][9].Among these parametric lighting models, the SG model is notable for its compactness and efficiency [10,11].It excels in capturing intricate high-frequency lighting details, enabling robust rendering of specular reflections and highlights in images, and has gained considerable recent attention [12][13][14].
4Gardner et al. [11] introduced a set of SG parameters representing lighting sources, considering their direction, position, color, and size.However, directly regressing such lighting source-dependent SG parameters often leads to unstable model training and inference due to the unconstrained number of lighting sources and floating lighting positions, thereby limiting the accuracy of the estimates.Li et al. [10] and Zhan et al. [14] instead employed a different SG representation where multiple SG components are evenly distributed over a unit sphere [15].In this representation, each SG component encodes the local light direction and intensity, as well as the ambient lighting.This Gaussian map representation effectively stabilizes inferencing and enables more effective optimization.Subsequent works [12,13,16] have built upon this SG map representation to predict lighting conditions for direct object rendering [10] or as a concise prior for improved environment map prediction [13,16].However, while Gaussian map predictions have shown promise, increasing the number of Gaussian components for better high-frequency information approximation often results in noisy predictions with too many or too few Gaussian components.
5In this paper, we introduce an innovative deep architecture aimed at enhancing Gaussian map predictions for improved indoor lighting estimation.Specifically, we leverage the Conformer architecture [17] to effectively extract lighting features from low dynamic range (LDR) input images by modeling both local and global lighting features, as well as their intricate relationships.Given that the input information is quite limited compared to the target panorama, which is typically less than 10% of the full scene in a standard image [18], a comprehensive understanding of both local lighting cues (e.g., small specular highlights) and global lighting cues (e.g., ambient lighting, shadows) is essential to allow the network to reliably infer lighting conditions.Furthermore, to improve the structural distribution of predicted spherical Gaussian components, we propose a multi-head transformer decoder structure, accompanied by a distribution consistency loss across multi-resolution SG distributions for better lighting structure learning.These innovations effectively mitigate potential noise in all spectra of SG map predictions and enhance the overall spatial structure of predicted lighting.Our experimental results demonstrate that our boosted transformer-based framework effectively enhances spherical Gaussian map predictions, leading to more realistic object rendering and more accurate guidance for environment map predictions.Our contributions are in summary:
Related work
6In this section, we first review existing work on various lighting representation methods.We further explore existing work on single-image lighting estimation, which is highly relevant to our topic.In general this work falls into two main categories, based on the nature of its output: lighting parameter regression and environment map generation/estimation.Most works take a single image as input, with a few exceptions such as Ref. [19], which utilizes a pair of stereo images.
Lighting representations
7Extensive research has been dedicated to devising methods for representing environmental lighting conditions.One widely adopted representation is the environment map [20,21], which characterizes lighting using dense 2D images.Typically, an environment map is derived from the projection of a high-dynamic-range (HDR) spherical image, employing techniques such as equirectangular projection or cube mapping.Environment maps are extensively employed in image-based rendering pipelines.However, their high dimensionality poses significant challenges when predicting individual pixels.Additionally, the non-uniform sampling on a spherical surface often introduces distortions or irregular shapes in the image, differentiating them from traditional images and presenting estimation challenges.
8Alternatively, parametric lighting models provide compact representations commonly used as prior lighting information for real-time rendering.Various parametric models, such as SG [22,23] and SH [24,25] lighting models, have been introduced.Lighting represented by SH often uses a predefined set of orthogonal polynomial functions defined on a spherical surface.It primarily describes lowfrequency illumination conditions, capturing overall tone and coarse highlight positions.While the SG model characterizes environmental lighting using Gaussian lobes, each of which is defined by several parameters such as size, central direction, and fatness/sharpness.It places more emphasis on highfrequency information related to the lighting source, encompassing detailed spatial positions, shapes, and intensity.Utilizing more SG components/functions often leads to a more precise description of the lighting conditions.In comparison to SH models with a predefined set of orthogonal polynomial functions [26], SG provides greater flexibility in configuring the shape, number, and distribution of basis functions.SG representations can also effectively mitigate potential ring artifacts introduced by high-order SH functions while approximating full-frequency lighting.With a similar number of parameters, SG excels in capturing spatial positions of lighting sources, detailed specular reflections, and highlights.In this paper, we primarily concentrate on estimating SG parametric lighting from a single standard image.We make the first attempt at investigating the spatial relationships between spherical Gaussian components across various SG resolutions.
Learning-based lighting parameter regression
9Several works focus on regressing lighting parameters from partial-view images using deep learning methods, primarily targeting real-time rendering and relighting applications.Garon et al. [27] and Cheng et al. [28] introduced a deep learning model for predicting scene illumination by regressing spherical harmonic (SH) coefficients.Gardner et al. [11] employed a parameterization scheme where each lighting source is represented by a single spherical Gaussian (SG) function.They developed a deep learning model to regress key lighting attributes, including light directions, light intensities, and light colors, for each individual lighting source.EMlight [14] introduced a method for predicting spherical Gaussian (SG) maps that encompass a fixed number of lighting components, referred to as anchors, which are uniformly distributed on a unit sphere.A spherical mover's loss was introduced to precisely regularize the distribution of SG components within the SG maps.These predictions are utilized as initial lighting structure guidance for the synthesis of panoramic illumination maps.GMlight [13] extended this work to incorporate depth information.It regularizes the Gaussian map learning in a geometric space using a geometric mover's loss guided by depth, enabling spatially varying lighting estimation.DSGlight introduced a graph-based framework to enhance SG map estimation.It employs a graph convolutional network (GCN) module to refine the color and depth of each SG component at a semantic structure level.Finally, Xu et al. [16] proposed a transformer-based model with self-attention mechanisms to improve contextual modeling of SG distributions, serving as a pre-processing step for further environment map estimation.
10Prior methods have mainly concentrated on enhancing the stability of regression models during training [14], and have attempted to introduce additional regularization techniques to improve the regression of lighting distributions for better preservation of full-frequency information [13,14].However, these efforts have primarily centered on improving the regression decoder [12,16], often neglecting the significance of the feature extraction module, which has a more critical impact on the final results.Additionally, regularization has typically been applied at the highest resolution, to maintain high-frequency details, which can be particularly challenging when working with very limited input information.
11To enhance the accuracy of our predictions, we propose improving the extraction of lighting features by considering both local and global lighting characteristics and their interrelationships through the Conformer network [17].Furthermore, we introduce a multi-head transformer decoder accompanied by an SG consistency loss to regularize SG distributions by using multi-resolution information, from sparse to dense, to promote a more profound understanding of their structural aspects.
Learning-based environment map generation
12Several deep learning methods have been introduced to estimate environment maps from standard images [4].The pioneering work of Gardner et al. [29] has since inspired a series of subsequent efforts [19,30,31] which address various critical aspects of this field, including the ability to handle spatial variations in indoor scenes [19,32], lightweight solutions for mobile applications [18], and the capacity to generalize to a wide range of input variations [33].Some recent notable work [13,14,16] has explored the use of sparse lighting representations as guidance for generating dense, pixel-wise environment maps.In such cases, SG maps and/or SH diffuse maps serve as instructive priors for directing the generation of lighting sources for the final environment map.
SG representation
13We employ Eq. ( 1) to represent illumination in the form of an SG map [14], denoted D:
14The original HDR environment map of the scene is partitioned into two components: the lighting source component (L hdr>I s ) and the ambient component (L hdr<I s ), based on an intensity threshold (I s = 0.05I max in our case), which depends on the maximal pixel value I max in the environment map.The lighting source regions are approximated using N SG functions [11], or anchor points, evenly distributed across a sphere.d i represents the direction of anchor point i, predefined using the method proposed by Vogel [15].The symbol u denotes an arbitrary direction vector on a unit sphere, and α stands for the inverse of angular size, which we set to the constant 1.Each lighting source is associated with neighboring anchor points based on a minimum radial distance criterion.The RGB value of each anchor point A i is calculated as Eq. ( 2) [14]:
15where p i ∈ argmin{d{p hdr>I s , d i }}, representing the collection of pixels nearest to the anchor point with direction d i .
16In the following sections, we start by analyzing the capability of SG maps with different resolutions to represent lighting features.This analysis will demonstrate the importance of our SG learning framework's design.Following that, we introduce our network structure and its associated learning scheme.
Multi-resolution SG analysis
17The resolution of the SG map, crucial for accurately capturing lighting information from a scene, is determined by the number N of SG functions.Figure 1 shows example scenes and their SG maps at different resolutions.Lower-resolution SG representations, characterized by fewer anchor points, provide a more generalized depiction of lighting conditions.They offer a rough but still informative overview of the primary light source's position and its central intensity.On the other hand, higherresolution SG representations, with a greater number of anchor points, excel at conveying intricate lighting source details.They effectively capture nuances such as shape, intensity variations, and directional shifts.At different resolutions, SG representations maintain consistent distribution patterns.As the resolution increases from low to high, a core spatial distribution is preserved, while each single light source can encompass multiple anchor points in light shaping, capturing complex semantic relationships between different anchors.
18To assess the accuracy of different SG map resolutions in representing the lighting sources, we conducted a comparison of angular and intensity deviations between the ground-truth lighting sources in the HDR environment map and those extracted from different SG maps.Following the approach of Gardner et al. [11], we detected the ground-truth lighting source regions using a region expansion method applied to the HDR environment map.This process begins with light peaks as initial seeds and incrementally expands until the intensity falls below one-third of the peak value.Subsequently, region merging is carried out based on overlapping regions.To extract lighting sources from SG maps, we aligned anchor points with their closest ground-truth lighting source regions.We ranked the top five lighting source regions based on peak intensity, arranging them from highest to lowest.For each of these regions, we conducted a statistical analysis of all anchor points within that specific region.The anchor point displaying the highest lighting intensity was designated as the extracted light source center.The outcomes, presented in Table 1, demonstrate that as SG resolution increases, the deviations in intensity and angular accuracy stemming from the lighting representation diminish.This highlights the significance of high-resolution SG maps in achieving precise lighting representation.
19The task becomes more challenging when aiming to predict high-resolution SG maps, primarily because it involves dealing with a substantially larger number of parameters.Unlike low-resolution predictions, which focus on estimating average positions and intensities, high-resolution predictions must delve into more intricate details, including the shapes of light sources and subtle intensity variations.Therefore, a more comprehensive set of representative lighting features becomes essential.Additionally, as the number of SG components increases, preserving the structural semantics of numerous discrete points becomes crucial for creating a meaningful representation of lighting sources.Ensuring structural consistency across resolutions can serve as a valuable regularization technique in this context, effectively reducing noise in high-resolution predictions and addressing sparsity issues in low-resolution predictions.
Network architecture 3.3.1 Overview
20Given a partial view image captured in a scene, we introduce SGformer for predicting the lighting conditions in a scene.Figure 2 presents an overview of the entire architecture.We utilize a Conformer encoder [17] to extract lighting features, which are then input into a multi-head transformer-based decoder.Subsequently, a fully connected layer is employed to convert these lighting features into SG lighting parameters at each resolution.This includes estimating the anchor point distributions, along with associated global average lighting intensity and RGB ratios [14,16].The network model is trained holistically, and we augment it with a structural consistency loss for additional regularization.
Conformer encoder
21Considering the limited scene information available from the input image and the wide variations in lighting conditions in indoor illumination, learning discriminative lighting-specific features concealed within input photos is crucial for a meaningful understanding and inference of lighting.Real-world lighting distributions exhibit intricate properties, with lighting features sometimes confined to small areas, like a specular highlight on an object's surface, and at other times extending widely, in such cases as light from a large window, or shadows.Different local and global lighting features often interact with each other; for instance, a specular highlight can be generated by a light source located far away from the viewer's perspective.
22Convolutional networks excel at capturing local features but tend to struggle when it comes to learning long-distance global relationships.On the other hand, the vision transformer is proficient at learning global representations but often overlooks fine local feature details.In our preliminary experiments, we observed that relying solely on a transformer as the feature extractor is susceptible to inaccuracies in predicting lighting intensity.To tackle this challenge, we got inspiration from the recent trend of combining these two technologies for various visual and other tasks [17,[34][35][36].In the context of light estimation, Xu et al. [16] leveraged the DETR method [37,38] that blends convolutional layers and transformers to extract lighting features.
23While this approach provided some relief from the issue, it still exhibited limitations in effectively modeling the interaction between local and global features within a cascade paradigm.
24We propose a new lighting feature extraction module based on Conformer [17] to enhance local and global feature extraction at various resolutions in an interactive manner.It comprises both a CNN branch and a transformer branch, with each layer featuring a dedicated feature coupling unit (FCU) to manage conflicts between and complementarities among lighting features at different levels.When combined with our multi-head decoder design, the Conformer encoder's feature extraction capabilities are bolstered by considering data at different SG resolutions.
Multi-head transformer-based decoder
25We propose a new multi-head decoder based on the aforementioned transformer-based DETR [16] method.In contrast to previous lighting prediction methods [16], which primarily focus on a single SG resolution, our approach introduces a multi-head decoder that simultaneously estimates various SG parameters at different resolutions.This architectural approach enhances feature learning, enabling the encoder to generalize to a variety of tasks with differing levels of complexity.The DETR decoder consists of multiple transformer blocks that include self-attention and cross-attention mechanisms, along with a learnable anchor query system for the simultaneous prediction of multiple targets.In our multi-head decoder structure, distinct anchor queries are used to handle different SG embeddings, in addition to a global query for obtaining global embeddings.Subsequent fully connected layers serve as the prediction head, transforming these feature embeddings into the respective SG parameters.
SG consistency loss
26Within the multi-head SG decoder, separate transformer decoders handle the decoding of lighting features at different SG resolutions.Consequently, there is no inherent guarantee of consistency between them.To enhance structural uniformity in predictions and simultaneously optimize both lighting encoding and decoding in a holistic manner, we introduce the SG consistency loss.This loss aligns SG maps across different resolutions via a spherical SG downsampling technique.It calculates the loss between the downsampled SG map and the real SG map at the current resolution, serving as a regularization term for model optimization.
27SG map downsampling is performed by searching for neighboring anchor points on the spherical surface between two adjacent SG map resolutions.The downsampling procedure is as Eq. ( 3):
28where j ∈ ||d j,r up − d i,r c || < R. The downsampled value for anchor point i at the current resolution, represented as A i,dn , is determined by selecting the maximum intensity value from all of its neighboring anchor points j in the higher resolution that are located within a radian range R from it.In our configuration, we set the resolutions to N = [8, 16, 32, 64, 128], and R is adjusted to [0.65, 0.4, 0.3, 0.3] accordingly to identify these neighboring points.The downsampling process is applied dynamically to the predicted SG parameters during training to compute the consistency loss.Figure 3 provides an example of SG downsampling between different SG resolutions and a comparison to actual SG maps.The SG consistency loss is calculated by applying both earth mover's distance and L2 norm to the predicted SG A pd , the ground truth A gt , and the downsampled SG A dn , as outlined in Eq. ( 4):
29where
30Here, EM(•) represents the spherical earth mover's distance [16], which measures the minimum amount of probability required to move points from one distribution to another, taking into account a cost matrix T (ij) determined by the predefined anchor positions and their radian distances around the sphere (Dist ij ) [15].Unlike L2 or cross-entropy metrics, the earth mover's distance can effectively leverage spatial information between distributed points when assessing the dissimilarity between two distributions.
Multiple resolution loss
31To individually supervise the generation of each SG resolution, we propose the multiple-resolution loss function in Eq. ( 5):
32For each resolution level i, L em , L l2 , L log represent the loss terms that control the intensity distribution of SG resolution N .L log is a log-transformed version of the root mean square error of the intensity distribution, designed to mitigate extreme values [16].L em is the earth mover's loss.L IG and L rgb are losses related to global intensity and RGB ratios.rendering loss proposed by Ref. [16], which has been shown beneficial for modeling high-frequency lighting features.
33During the training process, the multiple resolution loss function is initially employed to supervise each individual branch together.Once the model's training reaches a relatively stable state, the SG consistency loss across different resolutions is then applied to further refine the model holistically.
Approach
34We evaluated our proposed method on the Laval Indoor HDR Dataset [29].Each panoramic image in the dataset was cropped into eight images and tone-mapped into standard partial-view images to provide inputs.To account for the spatially varying indoor lighting within a fixed position, we followed the approach outlined in Refs.[16,29,30,33].This involves applying spatial warping and recentralization operations to the panoramic images, resulting in the final ground truth.By applying this transformation, the lighting representation is adjusted to better reflect the illumination conditions at the position where the object would be composited, rather than relying solely on the 360 • camera's position, which could be situated at varying distances from the composition place.Our training dataset consists of 1200 randomly selected scenes, providing a total of 1200 × 8 training pairs.The remaining 512 scenes were used for testing.The input crop size was set to (128, 128), and SG parameters at different resolution levels were extracted from the HDR environment map with dimensions (256, 128).
35We conducted a comprehensive evaluation, encompassing both qualitative and quantitative assessments, to thoroughly assess the performance of SG predictions and their impact on environment map generation.Our evaluation includes comparisons to state-of-the-art techniques and an ablation study.For a quantitative assessment of SG parameter predictions, we utilized the root mean square error (RMSE), ranked matching error (RME) [16], and L2 error for measuring global intensity and RGB ratio.To measure the quality of environment map generation, we employed well-established metrics such as RMSE, scale-invariant RMSE (si-RMSE), and angular lighting error.
Comparisons
36To illustrate the impact of our improved SG predictions on environment map generation and rendering, we utilize a neural projector model proposed by Xu et al. [16] [Xu22] for environment map generation.This model is distinguished among GAN-based neural projectors for its capability to generate high-frequency environments, attributed to its integration of both high-frequency SG and low-frequency SH as lighting priors.We conduct comparisons by generating environment maps based on our SG predictions and contrasting them with state-of-the-art approaches introduced by Gardner et al. [29], LeGendre et al. [18], Chalmers et al. [30], Zhao et al. [33], Zhan et al. [14], and Xu et al. Figure 4 displays the predicted SG maps (N = 128) generated by SGformer alongside the synthesized environment maps.These environment maps were produced using the predicted SG maps as a prior input to the GAN-based environment map neural projector.Our results indicate that SGformer can generate authentic SG maps that are close to the ground truth.These predictions play a dominant role in shaping the final environment map synthesis, particularly in influencing the lighting structure under the SPADE paradigm within the neural projector module.Precise SG map priors yield the creation of high-fidelity environment maps featuring realistic lighting representations.
37Our approach excels in both qualitative and quantitative evaluations to various environment map estimation methods.Figure 5 presents visual results, showing both the generated environment maps and their rendering effects on a virtual object (a ball).Our method outperforms competing approaches in several ways, including lighting distribution, color tone, and intensity variation.While the methods proposed Fig. 5 Environment map generation and corresponding rendering results for our method and state-of-the-art methods.Four examples are presented, in each: above: generated environment map, below: input crop containing an inserted virtual ball (with roughness level 0.2 for rows 2 and 4, and 0.5 for rows 6 and 8) rendered using the predicted environment map.Additional environment map synthesis results are provided in Fig. 1s in the Electronic Supplementary Material (ESM).RMSE, si-RMSE, and angular error between the lit ball and the corresponding ground truth are provided in Table 2.The introduction of GAN loss, as seen in [Zhan21] and [Xu22], enhances the fidelity of generated environment maps.However, these methods still struggle with accurate lighting distribution due to limitations in feature encoding and lighting decoding capabilities.Artifacts are apparent in specular and texture reflections on composite object surfaces with roughness = 0.2 (see Fig. 5, rows 2 and 4, columns 5 and 6).Moreover, discrepancies are observed in color tones, intensity, and highlight areas on object surfaces with roughness = 0.5 (see Fig. 5, rows 6 and 8, columns 5 and 6).Our results demonstrate a distinct advantage in lighting predictions, allowing the creation of the most authentic environment map and realistic object rendering effects.The overall structure of the environment map is better.Virtual objects within the scene are seamlessly composited, with good detail and accurate highlight distribution.
38These findings are consistent with the quantitative outcomes presented in Table 3, where we have compare average RMSE, si-RMSE, and angular error metrics [11].The results indicate the advances achieved by our approach in terms of both image quality and lighting direction within the generated environment maps.Our method achieved lower RMSE, si-RMSE, and angular error values associated with the main light source compared to other methods.While our method and [Xu22] utilize the same environment map generator, our method's unique strength lies in its ability to produce more accurate environment details and precise lighting directions.These improvements are primarily attributed to the advanced SG predictions generated by SGformer.
Approach
39To understand the individual contributions to SG predictions of each component within SGformer, we conducted an ablation study covering both encoder variants and decoder structures alongside the consistency loss design.Both quantitative and qualitative evaluations were performed.Quantitative assessments involved evaluating RMSE, L1 error, and ranked matching error (RME) [16].Additionally, we analyzed the L2 shift in intensity and RGB ratio values within the SG parameters.In contrast to the approach taken by Xu et al. [16], our RME calculations specifically concentrated on the first half of the sorted anchor points.This adjustment allows us to place more emphasis on evaluating the primary lighting elements.
Encoder variants
40To investigate the impact of different encoders on the extraction of lighting features and their subsequent influence on lighting predictions, we conducted an ablation study comparing the performance of DenseNet and DETR when used as the encoder alongside Conformer.For consistency, we employed the same DETR decoder with anchor points set at N = 128 for all encoder variants to generate the SG parameters.
41The DenseNet encoder is CNN-based and functioned as the primary feature encoder in previous works by Zhan et al. [13,14].
42The DETR encoder mixes CNN and transformer ideas, and was introduced by Xu et al. [16] in their deep learning architecture for lighting predictions.In this configuration, a particularly designed CNN module, DLA-SK, is used for local feature extraction, while a transformer module is used for global feature extraction.However, this concatenated structure overlooks the nuanced interplay between local and global features.In contrast, the Conformer we proposed to use a concurrent structure that enables a more interactive combination of local lighting features from the CNN branch and long-context global lighting features from the transformer branch.This approach better addresses conflicts and mutual interplay between these features.Both the output of the CNN branch and the transformer branch can be used as the lighting features.Here we used the CNN output and fed it into the transformer-based decoder to estimate the SG Figure 6 visually illustrates the significant advantages of Conformer over the DERT encoder in inferring lighting cues and generating highly accurate lighting tones, as exemplified in rows 2 and 3, where bluish lighting predictions can be observed as expected in Conformer results.Furthermore, this distinction becomes evident in challenging scenarios, such as row 4, where only minimal lighting cues, the faint lighting reflections on the door and wall, are present in the input images.Quantitative results further validate Conformer's effectiveness (see Table 4), as it is consistently best across all metrics.This indicates the essential role of the encoder in deducing lighting cues and emphasizes Conformer's capability in capturing both local and global lighting features while enhancing their synergy for superior lighting predictions.
Regression on multi-resolution SG
43To progressively investigate the impact of each key component within SGformer, including the encoder, decoder structure, and loss function design within SGformer, we conducted an ablation study using models created under three distinct setups: (i) training our backbone network with the Conformer encoder and a single decoder separately for each SG resolution (referred to as "Separate" Fig. 7); (ii) training the network with the Conformer encoder and multiple decoders (as in Fig. 2, referred to as "Multihead" in Fig. 7), and (iii) training with the Conformer encoder and multiple decoders, augmented by our proposed consistency loss (referred to as "Ours" in Fig. 7).These setups were evaluated across a spectrum of SG resolutions, with N = 8 to N = 128 anchor points.As Fig. 7 shows, the results obtained from our model that incorporates all components exhibits the closest alignment of anchor distributions to the ground truth across all SG resolutions (as seen in both "Ours" rows).In contrast, the separately trained model tends to exhibit random shifting or fading of anchors at different SG resolutions due to their isolated learning.Additionally, it struggles to precisely predict lighting shapes and locate lighting sources in high-resolution SG prediction (see the "Separate" row, "N = 128" column).The incorporation of a multi-head decoder, which utilizes a common encoder and facilitates joint learning for diverse SG regression tasks, enhances the consistency of anchor distributions across various SG resolutions.The introduction of a consistency loss further regulates the variations in anchor distributions spanning the spectrum of SG resolutions, resulting in improved lighting shape and spatial distributions (see "Ours" row, "N = 128" column).We assessed the mean similarity between the estimated SG maps and the corresponding ground truth by employing the structural similarity index metric (SSIM).We can Fig. 7 Ablation study on SG regression for various resolutions.Two exemplars are provided, where in each case, the top row exhibits the ground truth SGs, and the second row presents our results.The third row gives the results of the "Multihead" model.The fourth row displays the results of the "Separate" model.Additional results can be found in Fig. 2s in the ESM.
44see that the SG maps estimated by the full method exhibit the highest similarity to the ground truth.
45Quantitative results are provided in Table 5 and Table 6, providing various metrics including RMSE, RME, and L2 shift of intensity and RGB ratio values.The baseline network, introduced by Xu et al. [16] with a DETR encoder, was trained at different SG resolutions and serves as the reference point.The outcomes illustrate that the introduction of the Conformer encoder results in notable improvements over the baseline, particularly in terms of RMSE, RME, and global intensity metrics.The integration of multi-head decoding and consistency loss further enhances the model's capabilities, resulting in consistent improvements across all metrics.This enhancement is particularly evident in the reduction of RME, indicating optimized main lighting source distributions.
Discussions
46Our proposed method aims to estimate environmental lighting from a standard image, avoiding the need for direct panoramic image capture with expensive devices to obtain global illumination.While our supervised deep-learning method requires ground truth data during the training stage, once the model is trained, it can be applied to any arbitrary standard image captured by lightweight cameras, such as mobile phone cameras.The training ground truth in Laval Dataset has been publicly available, and we make full use of it in a on-off manner, consistent with the approach taken in most developments of machine/deep learning applications.
Conclusions and future work
47In summary, this paper introduced an advanced deep transformer-based approach to enhance indoor lighting estimation from single standard images.Our novel network architecture combines a Conformer model for global and local lighting feature extraction, with a multi-resolution transformer-based decoder for simultaneous SG parameter predictions at various resolutions.We are the first to explore the interplay of spatial distributions across multiple SG resolutions and utilize it to enhance the spatial distribution of lighting sources.To improve lighting structure modeling, we introduced an SG consistency loss to ensure consistency in spatial distributions across different SG resolutions.Our experiments have demonstrated significant improvements in lighting estimation, enhancing predictions of lighting source shapes, color tones, and lighting directions.As a powerful tool, SGformer effectively enhances the realism of environment map estimates, providing precise guidance for highly realistic environment map synthesis for seamless object rendering.Looking ahead, our future research will focus on advancing methods to gain a deeper understanding of the visual context and semantics within scenes, with the goal of achieving even more accurate and context-aware illumination predictions.
1
48Centre for Data Science and Artificial Intelligence & School of Engineering and Computer Science, Victoria University of Wellington, Wellington 6012, New Zealand.E-mail: J. Zhao, j.zhao@vuw.ac.nz ( ); B. Xue, bing.xue@ecs.vuw.ac.nz;M. Zhang, mengjie.zhang@ecs.vuw.ac.nz.Manuscript received: 2024-01-03; accepted: 2024-06-18
Fig. 1
49Fig. 1 Some scenes and their SG maps at various resolutions.
Fig. 2
50Fig. 2 SGformer takes a standard LDR image as its input and produces SG parameters at various resolutions as its output.It comprises a Conformer encoder and a multi-head transformer decoder.A novel SG consistency loss enhances regularization of learning the lighting structure.
The weights α 1
51to α 5 are empirically set to [10 3 , 10 3 , 10 −6 , 10 2 , 10 −1 ].Additionally, for high-resolution SG map prediction with N = 128, we incorporate the
Fig. 3
52Fig.3Comparison between SG maps downsampled from higher resolutions (above) and the corresponding ground truth SG maps (below).Above-left: the corresponding environment map.Below-left: ground-truth SG map with the highest resolution, N = 128.
53[16], referred to as [Gardner17], [LeGendre19], [Chalmers20], [Zhao21], [Zhan21], and [Xu22], respectively.The results presented for [Gardner17],[LeGendre19], [Chalmers20], and [Zhao21] were generated by each author using the testing data we provided.For [Zhan21], we generated the results ourselves based on their publicly available code and model.Note that our method and [Xu22] share the same neural projector and SH generation model, the difference being that we utilize SGformer to generate the SG lighting priors.
Fig. 4
54Fig. 4 SG maps generated by SGformer and corresponding synthesized environment maps guided by them through a GAN-based environment map neural projector.
55by [Gardner17], [LeGendre19], [Chalmers20], and [Zhao21] have gradually improved the approximation of lighting distributions, their generated environment maps often lack detail and clarity when rendering objects with low-roughness materials.
Fig. 6
56Fig. 6 SG maps with N = 128 anchors using DLA-SK and Conformer encoders, and the same transformer-based decoder in each case.
Table 1
57Intensity and angular errors of various SG resolutions representing the primary lighting sources.The table gives the top 5 lighting sources, ranked by intensity
Table 2
58Quantitative results of each example visualized in Fig.5
Table 3
59Quality of environment maps estimated by various methods, evaluated by RMSE, si-RMSE, and angular error metrics
Table 4
60Comparison of SG predictions using different encoders
Table 5
61Comparison of SG predictions using different encoders
Table 6
62Ablation study on SG regression with multi-head decoding and consistency loss training
참고문헌 25건
- Spherical harmonic lighting : the gritty details 2003
- Proceedings of Pacific Graphics 1999 Untitled Event · 1999
- All-frequency precomputed radiance transfer using spherical radial basis functions and clustered tensor approximation ACM Transactions on Graphics · Association for Computing Machinery · 2006 10.1145/1141911.1141981
- A better way to construct the sunflower head Mathematical Biosciences · Elsevier BV · 1979 10.1016/0025-5564(79)90080-4
- An efficient representation for irradiance environment maps 2001 10.1145/383259.383317
- Lambertian reflectance and linear subspaces IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2003 10.1109/tpami.2003.1177153
- Frequency space environment map rendering 2002 10.1145/566570.566611
- Learning to predict indoor illumination from a single image ACM Transactions on Graphics · Association for Computing Machinery · 2017 10.1145/3130800.3130891
- Learning Scene Illumination by Pairwise Photos from Rear and Front Mobile Cameras Computer Graphics Forum · Wiley · 2018 10.1111/cgf.13561
- Reconstructing Reflection Maps Using a Stacked-CNN for Mixed Reality Rendering IEEE Transactions on Visualization and Computer Graphics · Institute of Electrical and Electronics Engineers · 2020 10.1109/tvcg.2020.3001917
- End-to-End Object Detection with Transformers Lecture notes in computer science · Springer Science+Business Media · 2020 10.1007/978-3-030-58452-8_13
- Conformer: Convolution-augmented Transformer for Speech Recognition 2020 10.21437/interspeech.2020-3015
- GMLight: Lighting Estimation via Geometric Distribution Approximation IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2022 101109tip20223151997
- Deep Neural Models for Illumination Estimation and Relighting: A Survey Computer Graphics Forum · Wiley · 2021 10.1111/cgf.14283
- EMLight: Lighting Estimation via Spherical Distribution Approximation Proceedings of the AAAI Conference on Artificial Intelligence · Association for the Advancement of Artificial Intelligence · 2021 10.1609/aaai.v35i4.16440
- A Survey on Evolutionary Neural Architecture Search IEEE Transactions on Neural Networks and Learning Systems · Institute of Electrical and Electronics Engineers · 2021 10.1109/tnnls.2021.3100554
- Adaptive Light Estimation using Dynamic Filtering for Diverse Lighting Conditions IEEE Transactions on Visualization and Computer Graphics · Institute of Electrical and Electronics Engineers · 2021 10.1109/tvcg.2021.3106497
- Proceedings of the ACM Multimedia Asia 2019 10.1145/3338533
- Rendering-Aware HDR Environment Map Prediction from a Single Image Proceedings of the AAAI Conference on Artificial Intelligence · Association for the Advancement of Artificial Intelligence · 2022 10.1609/aaai.v36i3.20190
- Deep graph learning for spatially-varying indoor lighting prediction Science China Information Sciences · Springer Nature · 2023 10.1007/s11432-022-3576-9
- StyleLight: HDR Panorama Generation for Lighting Estimation and Editing Lecture notes in computer science · Springer Science+Business Media · 2022 10.1007/978-3-031-19784-0_28
- Deep Portrait Delighting Lecture notes in computer science · Springer Science+Business Media · 2022 10.1007/978-3-031-19787-1_24
- An attention-embedded GAN for SVBRDF recovery from a single image Computational Visual Media · Springer Nature · 2023 10.1007/s41095-022-0289-1
- Survey on Evolutionary Deep Learning: Principles, Algorithms, Applications, and Open Issues ACM Computing Surveys · Association for Computing Machinery · 2023 10.1145/3603704
- A Survey on 360° Images and Videos in Mixed Reality: Algorithms and Applications Journal of Computer Science and Technology · Springer Science+Business Media · 2023 10.1007/s11390-023-3210-1