Abstract
It is challenging to annotate large-scale datasets for supervised video shadow detection methods. Using a model trained on labeled images to the video frames directly may lead to high generalization error and temporal inconsistent results. In this paper, we address these challenges by proposing a Spatio-Temporal Interpolation Consistency Training (STICT) framework to rationally feed the unlabeled video frames together with the labeled images into an image shadow detection network training. Specifically, we propose the Spatial and Temporal ICT, in which we define two new interpolation schemes, i.e., the spatial interpolation and the temporal interpolation. We then derive the spatial and temporal interpolation consistency constraints accordingly for enhancing generalization in the pixel-wise classification task and for encouraging temporal consistent predictions, respectively. In addition, we design a Scale-Aware Network for multi-scale shadow knowledge learning in images, and propose a scale-consistency constraint to minimize the discrepancy among the predictions at different scales. Our proposed approach is extensively validated on the ViSha dataset and a self-annotated dataset. Experimental results show that, even without video labels, our approach is better than most state of the art supervised, semi-supervised or unsupervised image/video shadow detection methods and other methods in related tasks.
1. Introduction
Shadow detection is a fundamental task in computer vision, essential for applications such as object tracking, scene geometry estimation, and augmented reality. However, the field faces a significant data bottleneck: while large-scale datasets of labeled static images exist, annotating shadows in video sequences is incredibly labor-intensive. Models trained exclusively on static images often suffer from high generalization error and temporal inconsistencies—such as flickering or jumping shadows—when applied to sequential video frames.
To bridge this gap, this paper introduces STICT (Spatio-Temporal Interpolation Consistency Training). STICT is a framework that enables high-quality video shadow detection by training on both labeled images and unlabeled video frames. By enforcing consistency across spatial feature interpolations and temporal sequences, the model achieves state-of-the-art performance without the need for expensive, frame-by-frame video annotations.
2. The STICT Framework
The core of the proposed approach is a "Mean-Teacher" learning scheme. A "Student" network learns from both labeled images and unlabeled videos, while a "Teacher" network—maintained as an exponential moving average (EMA) of the student—provides stable targets for consistency training.
2.1 Spatial Interpolation Consistency Training (Spatial ICT)
Unlike standard "Mixup" techniques that interpolate in the RGB space, Spatial ICT operates in the high-level feature space. It interpolates between a pixel's feature and its most uncorrelated neighbor, identified via a Local Correlation Shuffle (LCS) module. This forces the model to learn more precise decision boundaries at the pixel level, leading to better generalization across different domains.
2.2 Temporal Interpolation Consistency Training (Temporal ICT)
To ensure temporal smoothness, the framework utilizes optical flow to interpolate a "middle" frame between two consecutive video frames. The model enforces a constraint where the prediction for the actual middle frame must match the warped predictions of its neighbors. This encourages the network to produce temporally consistent shadow maps without requiring explicit temporal labels.
2.3 Scale-Aware Network (SANet)
The underlying architecture, SANet, follows an Encoder-Decoder-Refiner structure. It incorporates a Feature Fusion Module (FFM) and a Detail Attentive Module (DAM) to capture shadow information across multiple scales. A scale-consistency constraint is applied during training to minimize discrepancies between predictions at different scales, ensuring the model remains robust to shadows of varying sizes.
3. Datasets and Evaluation
The model is trained using the SBU labeled image dataset as the primary supervised source. Evaluation is performed on the ViSha benchmark and a newly introduced dataset, VISAD (Video Shadow Detection). VISAD contains 81 videos categorized into "Driving Scenes" and "Moving Object Scenes," with 33 videos manually annotated to provide a rigorous evaluation benchmark.
4. Experimental Results
STICT demonstrates superior performance compared to existing supervised, semi-supervised, and unsupervised methods. Notably, on the Moving Object Scenes (MOS) subset of VISAD, STICT achieved a 29.3% lower Mean Absolute Error (MAE) and a 10.3% lower Balance Error Rate (BER) compared to the next best unsupervised method.
A key advantage of STICT is its efficiency. Because the complex spatio-temporal constraints (like optical flow) are only used during training, the inference process remains lightweight. The model can process a single frame in approximately 15ms on a standard GTX 2080Ti GPU, making it suitable for real-time applications.
5. Conclusion and Future Work
STICT provides a powerful framework for video shadow detection by effectively utilizing unlabeled video data to bridge the gap between static image training and temporal video application. While it sets a new state-of-the-art, limitations remain in handling extremely high-contrast scenes, distinguishing self-shadows from cast shadows, and accurately detecting soft-edged shadows. Future research will likely involve incorporating light physics to better model these complex illumination scenarios.
Summary updated