Introduction
Traditional shadow detection typically treats the problem as a binary segmentation task—identifying whether a pixel belongs to a shadow or not. However, in complex real-world environments, understanding the semantic relationship between a shadow and the specific object that cast it is crucial. This task, known as Instance Shadow Detection (ISD), is vital for applications such as light-aware photo editing, augmented reality, and scene understanding.
Existing ISD methods often rely on two-stage pipelines that first propose regions of interest (RoIs) and then attempt to associate shadows with objects. These approaches suffer from several drawbacks: rectangular RoIs poorly fit irregular shadow shapes, errors in the proposal stage are irrecoverable, and cropping loses global spatial context necessary for long-distance associations.
Methodology: SSISv2
To address these limitations, this research introduces SSISv2, a single-stage deep learning framework built upon the CondInst architecture. SSISv2 eliminates the need for RoIs, maintaining full image context and avoiding error accumulation from proposal stages.
Key Innovations
- Bidirectional Relation Learning: The model treats the shadow-object relationship as a geometric problem. It learns to predict offset vectors from an object's center to its shadow's center, and vice versa. This bidirectional approach provides a strong spatial prior for association.
- Deformable MaskIoU Head: To improve mask quality assessment, the authors implemented a head using deformable convolutions. This allows the model to better capture the specific geometry of instances, leading to more reliable confidence scores compared to standard mask heads.
- Boundary Loss: Using Laplacian filters to generate dual-boundary maps, the model employs a boundary loss to sharpen the edges of both "soft" shadows and "hard" objects.
- Shadow-Aware Copy-and-Paste: A specialized data augmentation technique ensures physically plausible object-shadow pairs are added to training scenes, accounting for layering and relighting to improve model generalization.
Experimental Results
The model was evaluated using the SOBA (Shadow OBject Association) dataset and a more challenging SOBA-challenge set featuring heavy occlusions and overlapping shadows. Performance was measured using SOAP (Shadow-Object Average Precision), which requires accuracy in the shadow mask, object mask, and their association simultaneously.
SSISv2 demonstrated a significant performance leap over the previous state-of-the-art, LISA:
- SOBA-testing: Achieved 35.3% SOAP, a 50% relative improvement over LISA (23.5%).
- SOBA-challenge: Outperformed LISA by over 70% (17.7% vs 10.4% SOAP), highlighting its robustness in complex, real-world scenes.
Conclusion
SSISv2 represents a major advancement in ISD by leveraging a single-stage architecture and bidirectional geometric learning. By avoiding the pitfalls of RoI-based methods, it achieves superior accuracy and robustness. Future work will focus on improving performance for very small instances and handling environments with multiple conflicting light sources.
This research was published in IEEE Transactions on Pattern Analysis and Machine Intelligence.
Summary updated