Abstract: This paper tackles a new photometric stereo task, named universal photometric stereo. Unlike existing tasks that assumed specific physical lighting models, which drastically limited their usability, a solution algorithm for this task is supposed to work for objects with diverse shapes and materials under arbitrary lighting variations without assuming any specific models. To solve this extremely challenging task, we present a purely data-driven method that eliminates the prior assumption of lighting by replacing the recovery of physical lighting parameters with the extraction of a generic lighting representation, named global lighting contexts (GLiCo). We use these contexts in a calibrated photometric stereo network to recover surface normal vectors pixel-wise. To adapt our network to a wide variety of shapes, materials, and lightings, it is trained on a new synthetic dataset, PS-Wild, which simulates the appearance of objects in the wild. Our method is compared with other state-of-the-art uncalibrated photometric stereo methods to demonstrate its significance.
1. Introduction
Photometric stereo is a fundamental computer vision task that aims to recover high-resolution surface normals of an object from a set of images captured under varying illumination. Traditionally, this task has been categorized into calibrated methods, which require known lighting parameters, and uncalibrated methods, which rely on simplified physical lighting models (e.g., directional or spherical harmonics). However, real-world lighting is often complex and spatially varying, involving near-field sources, inter-reflections, and shadows that violate these rigid assumptions.
In this work, we introduce Universal Photometric Stereo (UniPS), a novel framework designed to estimate surface normals under arbitrary, unknown lighting conditions without assuming any specific physical model.
2. The UniPS-GLC Framework
The proposed method, Universal Photometric Stereo Network using Global Lighting Contexts (UniPS-GLC), shifts the focus from recovering physical lighting parameters to extracting a generic, learned representation of the lighting environment.
2.1 Global Lighting Contexts (GLiCo)
Instead of a single light vector, the network extracts a feature map called Global Lighting Contexts (GLiCo). This representation captures the lighting "context" for every pixel, enabling the model to handle spatially-varying illumination, such as near-field lighting where the light direction changes across the object's surface.
2.2 Architecture
The network utilizes an encoder-decoder architecture. The Encoder uses a SwinTransformer to allow images to interact and extract the GLiCo at a fixed "canonical" resolution. This ensures a consistent receptive field regardless of input size. The Decoder then takes raw pixel values and the interpolated GLiCo to predict surface normals at the original resolution. This separation allows the model to process high-resolution images efficiently.
3. The PS-Wild Dataset
To train a model capable of "universal" performance, we developed PS-Wild, a large-scale synthetic dataset. It contains over 10,000 objects with diverse geometries and materials (metals, fabrics, woods), rendered using high-quality HDR environment maps in Blender Cycles. This simulates the complex, "wild" lighting conditions found in real-world environments, providing the necessary data for a purely data-driven approach.
4. Experimental Results
UniPS-GLC demonstrates significant improvements over state-of-the-art uncalibrated methods. On the PS-Wild test set, our method achieved a Mean Angular Error (MAE) of 13.8° under mixed lighting, compared to over 31° for existing methods like GCNet or variational approaches.
4.1 Robustness and Real-World Utility
The method is robust across various lighting types, including directional and natural HDRI lighting. Qualitative evaluations on real-world objects captured with handheld lights confirm that UniPS-GLC can recover fine details and handle challenging phenomena like inter-reflections and dark regions that typically cause other algorithms to fail.
5. Conclusion
UniPS-GLC represents a major step toward practical, "in the wild" photometric stereo. By replacing physical lighting models with learned global contexts, the framework achieves unprecedented accuracy and flexibility. Future work will focus on extending the model to handle extreme materials like mirrors and glass, as well as incorporating perspective camera models for even better real-world alignment.
Summary updated