JoIN: Joint GANs Inversion for Intrinsic Image Decomposition

Viraj Shah, Svetlana Lazebnik, Julien Philip

Abstract

Intrinsic Image Decomposition (IID) is the fundamental computer vision task of separating an image into its constituent physical layers: albedo (reflectance), shading (illumination), and specular (highlights). This task is inherently ill-posed, as infinite combinations of these components can produce the same observed pixel values. We introduce JoIN (Joint GANs Inversion), a framework that addresses IID by jointly inverting a bank of independently trained GANs—one for each intrinsic component. By leveraging specialized priors and a novel kNN-based latent regularization, JoIN achieves superior disentanglement and successfully bridges the "sim-to-real" gap, particularly for complex subjects like human faces.

1. Introduction

Intrinsic Image Decomposition is a classic inverse problem in computer vision. While humans can effortlessly distinguish between a dark surface and a light surface in shadow, computational models often struggle with "cross-contamination," where textures are mistakenly attributed to lighting or vice versa.

Overview of the intrinsic image decomposition task, showing the forward model $f(\cdot)$ that combines albedo, shading, and specular components into a natural image $I^*$.

Traditional deep learning approaches typically train a single monolithic network to predict all components simultaneously. However, these models often fail to generalize to real-world data because they are trained on synthetic ground truth that lacks the complexity of natural lighting. JoIN rethinks this by using a modular "Bank of GANs" approach, ensuring that each component is generated by a model specifically trained to understand its unique distribution.

2. The JoIN Framework

The core innovation of JoIN lies in its multi-stage pipeline that moves from component-specific training to joint inversion and real-world adaptation.

2.1 Bank of GANs and Joint Inversion

Instead of a single model, JoIN utilizes separate StyleGAN2 generators ($G_{al}$, $G_{sh}$, $G_{sp}$) for albedo, shading, and specular components. Because the albedo generator is trained exclusively on albedo maps, it lacks the capacity to generate shadows, which physically enforces disentanglement during the inversion process.

To decompose an input image $I^*$, the system searches for the optimal latent codes ($w^*_{al}, w^*_{sh}, w^*_{sp}$) across all generators simultaneously. These outputs are combined via a forward imaging model: $$I^* \approx sRGB(G_{al}(w^*_{al}) \cdot G_{sh}(w^*_{sh}) + G_{sp}(w^*_{sp}))$$

The JoIN pipeline: (Left) Training independent GANs for each component; (Middle) Step 1: Joint inversion on synthetic data with kNN loss; (Right) Step 2: Fine-tuning on real images with localized discriminator loss.

2.2 kNN-based Latent Regularization

Standard GAN inversion often suffers from a "mean-seeking" bias, where the model produces overly smooth, average-looking results. JoIN introduces a kNN loss to address the non-isometric nature of the GAN's latent space. By ensuring that the optimized latent codes stay near their nearest neighbors in the original training distribution, the model preserves fine details like skin pores, wrinkles, and complex textures.

2.3 Bridging the Sim-to-Real Gap

To handle real-world photographs where the synthetic priors might be slightly off, JoIN employs a localized generator fine-tuning strategy. To prevent the generators from "forgetting" their specific roles (e.g., the shading model starting to generate skin texture), the authors use a Localized Discriminator Loss. This acts as a "realness" guardrail, using the original GAN's discriminator to ensure each component remains physically plausible during the fine-tuning process.

3. Evaluation and Results

JoIN was evaluated across diverse datasets, including Lumos (synthetic faces), FFHQ (real faces), and various material and indoor scene datasets (Hypersim).

  • Quantitative Performance: On the Lumos dataset, JoIN achieved a Peak Signal-to-Noise Ratio (PSNR) of 27.34, significantly outperforming previous state-of-the-art methods like PieNet (~19.5 PSNR).
  • Qualitative Disentanglement: Visual results demonstrate that JoIN produces exceptionally clean albedo maps, successfully removing harsh shadows and specular highlights from real-world portraits while maintaining the subject's identity.
  • Applications: The high-quality separation allows for downstream tasks like relighting. By keeping the albedo component fixed and swapping the shading latent code, users can realistically change the lighting environment of a portrait without introducing artifacts.

4. Conclusion and Future Work

JoIN demonstrates that modular, specialized priors are highly effective for solving ill-posed inverse problems like IID. While the current optimization-based approach is slower than feed-forward networks (taking approximately 190 seconds per image), it provides a level of detail and disentanglement previously unattainable. Future research may explore the use of Diffusion Models as priors to capture even more complex scene distributions and methods to accelerate the inversion process for real-time applications.

Summary updated

BibTeX
@article{shah2025join,
  author = {Viraj Shah and Svetlana Lazebnik and Julien Philip},
  title = {{JoIN: Joint GANs Inversion for Intrinsic Image Decomposition}},
  journal = {TMLR},
  year = {2025},
}
Figure