Physics-Grounded Attached Shadow Detection Using Approximate 3D Geometry and Light Direction

Shilin Hu, Jingyi Xu, Sagnik Das, Dimitris Samaras, Hieu LearXiv 2025 · DOI

Abstract

Shadows are fundamental to scene understanding, yet the computer vision community has largely focused on cast shadows, leaving attached shadows—the dark regions on an object's surface facing away from the light—relatively neglected. This paper presents a novel framework for the joint detection of cast and attached shadows by explicitly modeling the physical interplay between light direction and surface geometry. Through an iterative feedback loop that refines light estimation and shadow masks, the proposed method achieves a 33% reduction in Balanced Error Rate (BER) for attached shadow detection compared to state-of-the-art models.

Introduction

In computer vision, shadows are more than just image artifacts; they are vital cues for inferring 3D shape, depth, and scene illumination. Historically, research has prioritized cast shadows—the silhouettes projected by an object onto other surfaces. In contrast, attached shadows—which occur on the object itself where the surface normal points away from the light source—have been overlooked. This neglect stems from a lack of annotated data and the inherent difficulty in distinguishing attached shadows from dark material textures.

Attached shadows (highlighted in green) represent regions where the object's surface turns away from the light source.

Methodology

The proposed framework employs a closed-loop reasoning process to bridge the gap between 2D image data and 3D physical constraints. The system consists of two primary components:

  1. Shadow Detection Module: A segmentation network that classifies pixels into background, cast shadow, or attached shadow.
  2. Light Estimation Module: This module utilizes predicted shadow masks and estimated surface normals (derived from foundation models like Depth Anything v2) to infer the 3D light direction.

Iterative Refinement

A key innovation is the iterative feedback loop. The system uses the estimated light direction and surface geometry to generate a "partial attached shadow map"—a physical prior indicating where shadows must exist based on geometry. This map is fed back into the detection module, allowing the model to progressively refine its predictions over multiple passes. Additionally, a class-conditional margin loss is employed to help the network distinguish between the distinct features of cast and attached shadows.

The Attached Shadow Dataset

To address the data scarcity, the authors curated a new benchmark by re-annotating 1,458 images from the WSRD, SOBA, and CUHK datasets. This dataset provides the first comprehensive resource for joint shadow detection, including manual masks for both shadow types, estimated 3D light directions, and surface normal maps.

Results and Discussion

The physics-grounded approach demonstrates superior performance over existing intensity-based models. Quantitative evaluations show a significant leap in accuracy:

  • Error Reduction: A 33% reduction in Balanced Error Rate (BER) for attached shadows compared to the previous state-of-the-art (SILT).
  • Detection Quality: The model achieved an F1-score of 86.49 for attached shadows, a substantial improvement over baseline methods which typically range from 50 to 80.
Qualitative comparison showing the proposed method's ability to accurately separate cast (e) and attached (f) shadows compared to traditional methods (b-d).

Qualitatively, the model excels at following fine-grained geometry, such as the intricate folds of clothing or the undersides of complex structures, where traditional methods often fail by "bleeding" shadow predictions into dark non-shadowed regions.

Conclusion

By integrating 3D geometric priors and light direction into the detection pipeline, this work establishes a new state-of-the-art for shadow analysis. While the current model assumes a single directional light source and relies on external normal estimation, it provides a robust foundation for future research into complex lighting environments and instance-level shadow reasoning.

Summary updated

BibTeX
@misc{hu2025physics,
  author = {Shilin Hu and Jingyi Xu and Sagnik Das and Dimitris Samaras and Hieu Le},
  title = {{Physics-Grounded Attached Shadow Detection Using Approximate 3D Geometry and Light Direction}},
  year = {2025},
  eprint = {2512.06179},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.06179},
}
Figure