DeepShadow: Neural Shape from Shadow

Asaf Karnieli, Ohad Fried, Yacov Hel-Or

Abstract

DeepShadow is a novel "one-shot" reconstruction method that recovers high-quality 3D depth maps and surface normals using only binary shadow maps from photometric stereo. Unlike traditional methods that treat shadows as noise or disturbances, DeepShadow leverages cast shadows as a primary geometric signal. By employing a differentiable, physics-based optimization at inference time, the method achieves state-of-the-art results without requiring large-scale pre-training.

Introduction

In traditional photometric stereo, researchers attempt to recover the shape of an object by analyzing how its surface brightness changes under different lighting conditions. Usually, shadows—both "self-shadows" (where the surface faces away from the light) and "cast shadows" (where one part of an object blocks light from reaching another)—are treated as noise that breaks standard algorithms.

DeepShadow flips this script, arguing that shadows are actually a rich, unambiguous source of geometric information. While shading can be confused by complex materials or specular highlights, a shadow represents a binary truth: either the light is blocked, or it isn't. The primary challenge is that shadows are "global" effects; a shadow at the bottom of an object might be caused by a peak at the top, making the underlying mathematics significantly more complex than local shading models.

Methodology

The core of DeepShadow is an inference-time optimization loop that bridges 2D images and 3D geometry through a neural representation.

  1. Neural Representation: The system represents the object's depth map using a Multi-Layer Perceptron (MLP). Given a pixel coordinate $(u, v)$, the MLP predicts a depth value $\hat{d}$.
  2. Differentiable Shadow Line Scan: This is the paper's key technical innovation. To calculate shadows, the algorithm projects the light source onto the image plane and traces rays. It uses a 1D "line-of-sight" algorithm to determine if a point is occluded. Crucially, this process is differentiable, allowing gradients to flow from the shadow error back into the MLP's weights.
  3. Optimization: During inference, the MLP is optimized to minimize the difference between the predicted shadow maps (generated from the current depth estimate) and the input shadow maps.
The DeepShadow framework: An MLP predicts depth, which is used to generate a shadow map. The error between this and the ground-truth shadow map is used to optimize the MLP.

By using a 1D line-scan approach rather than a full 3D volume, the method achieves linear computational complexity $O(N)$ relative to image size, making it efficient for high-resolution depth maps.

A visualization of the 1D Shadow Line Scan algorithm, which determines visibility by comparing angles along a ray from the light source.

Experiments and Results

The authors evaluated DeepShadow on a mix of synthetic and real-world data, including complex shapes like roses and cacti. DeepShadow significantly outperforms existing state-of-the-art (SOTA) photometric stereo methods in depth estimation. On synthetic benchmarks, DeepShadow achieved a normalized mean depth error (nMZE) that was 1.7x lower than Peng et al. and 4.9x lower than Santo et al.

Key insights from the results include:

  • Shadows as Signal: In scenes with complex geometry, shadows provide a stronger learning signal than shading. As the amount of shadow increases, DeepShadow becomes more accurate, whereas traditional methods degrade.
  • Material Agnostic: Because the method relies on binary shadow maps, it is naturally resilient to non-Lambertian effects like specular highlights that typically ruin shape-from-shading.

Conclusion

DeepShadow demonstrates that shadows, often discarded as noise, are a powerful signal for 3D reconstruction. While the method relies on the presence of cast shadows—making it less effective for perfectly convex objects—it excels in capturing sharp transitions and fine details in complex geometries. Future work may involve hybrid models that combine shadow-based global structure with shading-based local surface details.

Summary updated

BibTeX
@inproceedings{karnieli2022deepshadow,
  author = {Asaf Karnieli and Ohad Fried and Yacov Hel-Or},
  title = {{DeepShadow: Neural Shape from Shadow}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-20086-1\_24},
}
Figure