Single-Stage Instance Shadow Detection With Bidirectional Relation Learning

Tianyu Wang, Xiaowei Hu, Chi-Wing Fu, Pheng-Ann Heng

Abstract

Instance shadow detection is a complex computer vision task that requires identifying individual shadows and correctly pairing them with the specific objects that cast them. Traditional two-stage "proposal-then-crop" methods often struggle with the irregular geometry of shadows and the feature mismatch between shadows and objects. This paper introduces SSIS (Single-Stage Instance Shadow Detection), a fully convolutional network that employs a bidirectional relation learning module. By predicting geometric offset vectors between objects and shadows in both directions, SSIS achieves a 27.4% Shadow Object Average Precision (SOAP), representing a 29% relative improvement over previous state-of-the-art models.

Introduction

In computer vision, detecting shadows is a long-standing task, but instance shadow detection adds a layer of complexity by requiring the association of each shadow with its source object (e.g., a car, person, or animal). Previous methods relied on two-stage frameworks that first generated rectangular "region proposals" and then attempted to match them in post-processing. This approach suffers from three major flaws:

  1. Irregular Shapes: Shadows are rarely rectangular; bounding boxes often include irrelevant background noise.
  2. Feature Mismatch: Shadows and objects have vastly different visual characteristics, making it hard for a network to learn a single "association" category.
  3. Error Accumulation: Failures in the initial proposal stage cannot be corrected later.

Methods

The authors propose SSIS, a single-stage, fully convolutional network (FCN) that processes the entire image at once. Built upon the CondInst dynamic instance segmentation framework, SSIS eliminates the need for region cropping.

The SSIS architecture features a bidirectional relation learning module that uses offset vectors and dynamic filter generation to associate objects and shadows.

The "secret sauce" of the architecture is Bidirectional Relation Learning. Instead of using bounding boxes, the network treats the relationship as a geometric offset. For every detected object, the network learns an offset vector pointing to the center of its shadow; simultaneously, for every shadow, it learns a vector pointing back to the object. This symmetry provides a stronger supervisory signal during training, helping the model resolve ambiguities in crowded scenes. Furthermore, the network uses a "paired controller" to generate unique parameters (filters) for mask heads, allowing for the dynamic generation of corresponding instance masks.

Datasets and Evaluation

The model was evaluated on the SOBA (Shadow OBject Association) dataset, which contains 1,000 images and 3,623 shadow-object pairs sourced from diverse datasets like ADE20K, SBU, ISTD, and Microsoft COCO. The training set consists of 840 images (2,999 pairs), while the test set includes 160 images (624 pairs).

Key Results

SSIS significantly outperformed the previous state-of-the-art method, LISA, across all major metrics. On the SOAP metric, SSIS achieved 27.4%, compared to LISA's 21.2%. The model showed even more dramatic gains in "Association AP," jumping from 40.8 to 50.5.

Qualitative comparison showing (a) input, (b) LISA's failure in complex scenes, (c) the learned bidirectional paired locations, and (d) the final SSIS output.

Visually, the model excels in complex scenarios. For example, in scenes with multiple similar objects (like horses in a field), SSIS correctly pairs distant shadows with their source objects, whereas box-based models often incorrectly link them to closer, irrelevant instances. By moving beyond boxes to center-point offsets, the model is far more robust to the irregular and disconnected shapes typical of shadows.

Limitations and Future Work

Despite its success, the authors noted that SSIS can struggle with "extreme" scenarios, such as very tiny shadow regions or instances where one part of the pair is almost entirely occluded. Additionally, the current implementation is biased toward visible pairs and ignores instances where only a shadow or only an object is present. Future research will explore the use of synthetic data and unlabeled web data to improve robustness and generalize the approach to tasks like light direction estimation.

Summary updated

BibTeX
@inproceedings{wang2021single,
  author = {Tianyu Wang and Xiaowei Hu and Chi-Wing Fu and Pheng-Ann Heng},
  title = {{Single-Stage Instance Shadow Detection With Bidirectional Relation Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00007},
}
Figure