Authors: Vaibhav Thalanki, Oliver Fritsche, Sai Manichandana Devi Thumati
Institution: Khoury College of Computer Sciences, Northeastern University
This project implements an intrinsic image decomposition pipeline inspired by Garces et al. (2012) that separates photographs into reflectance (surface color) and shading (illumination) components. The pipeline uses SLIC superpixel segmentation with KMeans clustering and solves a sparse linear system balancing reflectance consistency and edge-aware shading smoothness.
- Intrinsic Decomposition: Separates images into reflectance and shading using clustering-based approach
- Sepia Tone Transform: Applies artistic sepia effect to reflectance component
- Automatic Light Detection: Point-light simulation with automatic light source detection (Lopez-Moreno et al. 2010)
- Directional Lighting: Simulates lighting from right edge
- Photorealistic Composition: Linear RGB space composition with automatic exposure adjustment
- Decompose input image into reflectance (R) and shading (S)
- Apply sepia stylization to R
- Relight S using point-auto or directional mode
- Recompose in linear space with automatic exposure correction
![]() Original Reflectance |
![]() Original Shading |
![]() Sepia-transformed Reflectance |
![]() Relit Shading (Point-Auto) |
![]() Final Combined Output (Point-Auto Relighting) |
pip install -r ./requirements.txtpython run_pipeline.py <image_path> [options]Options:
--mode {point_auto,directional_right}- Relighting mode (default: point_auto)--out_dir PATH- Output directory (default: ./outputs)--clusters K- Number of KMeans clusters (default: 10)--n_segments N- Number of SLIC superpixels (default: 600)--sepia FLOAT- Sepia intensity 0-1 (default: 0.85)
Example:
python run_pipeline.py ./inputs/input_image3.jpg --mode point_auto --out_dir ./outputsThe script generates decomposition and relighting results in the specified output directory.
intrinsic/ # Decomposition module
relight/ # Relighting modules (point, directional, compose)
utils/ # Color space utilities
outputs/ # Generated results
inputs/ # 5 chosen input images
- Superpixels: 600 segments, compactness 10.0
- KMeans clusters: K=10
- Smoothness: λ=0.2, σ=0.1
- Sepia intensity: t=0.85
Since this is a classical (non-learning) approach, new shadows do not form when introducing artificial light sources. Modern deep learning methods address this limitation by learning shadow formation implicitly.
Images sourced from Intrinsic Images in the Wild (Bell, Bala, and Snavely 2014), a large-scale public dataset with crowdsourced material property annotations.




