Leave-One-Out Kernel Optimization for Shadow Detection

Tomas F. Yago Vicente, Minh Hoai, Dimitris SamarasICCV 2015

Introduction

Shadow detection is a fundamental challenge in computer vision, as shadows can significantly alter the perceived color and texture of objects, leading to failures in downstream tasks like segmentation, tracking, and scene understanding. While physics-based models often struggle with the variability of "in-the-wild" consumer photography, statistical learning approaches face difficulties in effectively integrating diverse features (color, intensity, texture) and accounting for spatial context. This paper introduces a robust framework that treats shadow detection as a region-labeling problem, utilizing the unique mathematical properties of Least-Squares Support Vector Machines (LSSVM) for efficient parameter optimization.

Methodology

The proposed pipeline, known as LooKOP (Leave-one-out Kernel Optimization), consists of several distinct stages designed to move from raw pixels to semantically meaningful shadow labels.

Region Generation and Classification

Instead of operating on individual pixels, the framework groups pixels into larger regions using SLIC superpixels followed by Mean-shift clustering. This provides a more stable basis for feature extraction. For classification, the authors employ an LSSVM. The primary advantage of LSSVM is its closed-form solution, which allows for the near-instantaneous calculation of the leave-one-out (LOO) cross-validation error. This efficiency enables the direct optimization of kernel parameters—specifically feature weights ($w$) and scaling factors ($\sigma$)—without the need for computationally expensive retraining cycles.

The multi-stage pipeline: (top-left) original image, (top-right) superpixel segmentation, (bottom-left) MRF region boundaries, and (bottom-right) final shadow detection.

Kernel Optimization and MRF Integration

The kernel is defined as a weighted sum of extended Gaussian kernels covering CIELAB color channels and texton histograms. Optimization is performed via a beam search with random steps, targeting the minimization of the LOO balanced error rate (BER). To incorporate local context, the classifier is embedded within a Markov Random Field (MRF) featuring two types of pairwise potentials:

  1. Affinity: Encourages adjacent regions with similar appearances to share labels.
  2. Disparity: Uses a specialized classifier to identify transitions between shadowed and lit regions of the same material, penalizing inconsistent labeling at these critical boundaries.

Experimental Results

The framework was evaluated on the UCF and UIUC datasets. The UIUC dataset is particularly notable for its "ground truth" methodology, where scenes are captured both with and without a light source to isolate shadows precisely.

Comparison of Balance Error Rates (BER) on UCF and UIUC datasets, showing the incremental benefits of adding MRF components to the base LooKOP classifier.

As shown in the results, the LooKOP+MRF configuration set new benchmarks:

  • UIUC Dataset: Achieved a BER of 7.2%, significantly outperforming the leading Convolutional Neural Network (ConvNet) of the time (10.6%) and reducing the false negative rate by over 35%.
  • UCF Dataset: Achieved a BER of 13.2%, surpassing the state-of-the-art ConvNet+CRF models (14.7%).
  • Ablation Studies: The data indicates that the standalone LooKOP classifier is remarkably potent, often outperforming more complex context-aware models even before MRF integration.

Discussion and Limitations

The success of LooKOP stems from its mathematical efficiency and its focus on the balanced error rate, which prevents the model from being biased toward the majority "non-shadow" class. However, the method remains dependent on the quality of the initial segmentation; if a region spans both shadowed and unshadowed areas, the classifier cannot produce an accurate result. Furthermore, as an appearance-based model, it remains susceptible to "geometric blindness," where dark-colored objects may be misidentified as shadows. Future work suggests that incorporating 3D scene layout or more advanced boundary detection could mitigate these remaining ambiguities.

Summary updated

BibTeX
@inproceedings{vicente2015leave,
  author = {Tomas F. Yago Vicente and Minh Hoai and Dimitris Samaras},
  title = {{Leave-One-Out Kernel Optimization for Shadow Detection}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2015},
  doi = {10.1109/iccv.2015.387},
}
Figure