Abstract: Understanding shading effects in images is critical for a variety of vision and graphics problems, including intrinsic image decomposition, shadow removal, image relighting, and inverse rendering. As is the case with other vision tasks, machine learning is a promising approach to understanding shading - but there is little ground truth shading data available for real-world images. We introduce Shading Annotations in the Wild (SAW), a new large-scale, public dataset of shading annotations in indoor scenes, comprised of multiple forms of shading judgments obtained via crowdsourcing, along with shading annotations automatically generated from RGB-D imagery. We use this data to train a convolutional neural network to predict per-pixel shading information in an image. We demonstrate the value of our data and network in an application to intrinsic images, where we can reduce decomposition artifacts produced by existing algorithms.
Introduction
In computer vision, "intrinsic image decomposition" is the process of taking a single photograph and separating it into a reflectance layer (the true color and texture of the objects) and a shading layer (the effect of light, shadows, and geometry). This decomposition is a fundamental challenge; while researchers can create ground truth for reflectance by measuring materials, measuring "pure shading" in a complex, real-world environment is nearly impossible without altering the scene.
Consequently, most existing datasets are either synthetic or limited to small sets of isolated objects. The Shading Annotations in the Wild (SAW) dataset fills this gap by leveraging human intuition to annotate shading in thousands of diverse, "in the wild" indoor scenes, providing the first large-scale dataset of real-world shading judgments.
The SAW Dataset
The SAW dataset contains nearly 7,000 photos with roughly 15,000 shadow boundary points and 24,000 constant shading regions. It was designed to be compatible with existing benchmarks like the Intrinsic Images in the Wild (IIW) dataset, while adding a new layer of shading-specific ground truth. To handle geometric complexities, the authors also utilized the NYU Depth Dataset v2 to automatically flag edges where physical geometry changes (non-smooth shading).
Methodology
The researchers developed a hybrid pipeline to collect shading data at scale, combining human judgment with automated extraction:
- Crowdsourcing Human Intuition: Since humans excel at local comparisons rather than absolute estimations, Amazon Mechanical Turk workers identified Constant Shading Regions (S)—areas where light is uniform despite complex surface textures—and Shadow Boundaries (NS-SB)—points where brightness changes are caused specifically by cast shadows.
- Automated Geometry Extraction: For non-smooth shading caused by physical corners or depth changes (NS-ND), the authors used RGB-D data to automatically identify geometric edges.
- CNN Training: A convolutional neural network (CNN) was trained to classify every pixel into one of three categories: Smooth, Shadow Boundary, or Geometric Discontinuity. A key insight was the value of textured constant-shading regions; by training on regions where shading is constant despite heavy texture, the CNN learns to distinguish between material changes and lighting changes.
Key Results and Applications
The CNN’s predictions were integrated into a traditional "Retinex" algorithm to improve intrinsic image decomposition. By providing a strong prior on where shading is likely to be smooth, the model successfully prevented the algorithm from mistakenly attributing surface textures (like floor patterns or fabric designs) to the shading layer.
- Competitive Accuracy: The CNN achieved precision scores on identifying smooth shading that rivaled or exceeded state-of-the-art global optimization algorithms.
- Qualitative Improvements: The model significantly reduced "leakage" artifacts. For example, in images of patterned blankets or rugs, the CNN correctly identified the shading as smooth, allowing the decomposition algorithm to keep the pattern entirely within the reflectance layer.
- Efficiency: The feed-forward CNN approach proved highly efficient, performing competitively with complex optimization methods that require much higher computational costs.
Conclusion and Future Work
SAW demonstrates that crowdsourced human judgments are a robust source of ground truth for complex lighting effects. While the current model shows some limitations, such as confidence saturation and occasional edge bleed at geometric corners, it provides a powerful new tool for inverse rendering. Future work may involve multi-task learning to jointly predict shading, surface normals, and material types, further refining our ability to decompose the visual world into its intrinsic components.
Summary updated