ShadowCast: On-the-Fly Context-Aware Shadow Augmentation for Remote Sensing Image Segmentation
Authors: Dongho Yoon, Yechan Kim, Jongmin Joo, JongHyun Park, Moongu Jeon
Organizations: Gwangju Institute of Science and Technology (GIST), 123 Cheomdangwagi-ro, Buk-gu, Jeonnam-Gwangju, 61005, Korea · AI Laboratory, LIG Defense&Aerospace, 333 Pangyo-ro, Bundang-gu, Seongnam-si, Gyeonggi-do, 13488, Korea
Shadows cast by elevated objects alter the spectral appearance and obscure the boundaries of objects in remote sensing images, thereby degrading semantic segmentation performance. Most existing approaches handle shadows as degradations to be detected and removed, requiring additional costs from dedicated networks and shadow-specific annotations. We propose ShadowCast, which takes the opposite approach: it synthesizes shadows and injects them during training for remote sensing segmentation. It extracts masks of elevated objects, such as buildings and trees, directly from the segmentation labels and estimates an image-specific cast-shadow direction cue by probing the brightness around them. It then projects synthetic shadows along the inferred cast-shadow direction, requiring no learned network and no acquisition metadata. Experiments on three widely used remote sensing benchmarks, Vaihingen, Potsdam, and LoveDA, show that ShadowCast consistently outperforms the baseline across diverse state-of-the-art segmentation architectures. Moreover, it brings additional performance gains when combined with standard augmentation and regularization techniques, indicating that stochastic shadow injection serves as a simple and complementary augmentation strategy for remote sensing segmentation.
Figures & tables
Fig. 1: Pipeline of our ShadowCast for remote sensing image segmentation.
Fig. 2: Behaviors of ShadowCast under varying values of θ⋆ , d , and δ .
Cast-shadow direction
Vaihingen
Potsdam
LoveDA
No shadow augmentation
77.53 ± 0.30
82.95 ± 0.10
43.29 ± 0.77
Random direction
78.14 ± 0.10
83.13 ± 0.14
43.61 ± 0.50
Estimated direction
78.20 ± 0.07
83.22 ± 0.13
44.45 ± 0.30
+ Jittering ( Ours )
78.46 ± 0.19
83.32 ± 0.09
44.89 ± 0.09
TABLE I: Effect of cast-shadow direction selection in ShadowCast across three benchmarks using DeepLabV3+ ( p=0.5 ; dmin=5 ; dmax=30 ; δmin=0.5 ; δmax=0.8 ; η=15 ; τ=50 ; r=8 ).
Model
Vaihingen
Potsdam
LoveDA
Baseline
ShadowCast
Baseline
ShadowCast
Baseline
ShadowCast
DeepLabV3+ [ 20 ]
77.53 ± 0.30 (+0.00)
78.46 ± 0.19 ( +0.93 )
82.95 ± 0.10 (+0.00)
83.32 ± 0.09 ( +0.37 )
43.29 ± 0.77 (+0.00)
44.89 ± 0.09 ( +1.60 )
DANet [ 21 ]
79.59 ± 0.61 (+0.00)
80.20 ± 0.06 ( +0.61 )
84.47 ± 0.24 (+0.00)
84.88 ± 0.04 ( +0.41 )
43.35 ± 0.78 (+0.00)
44.43 ± 0.85 ( +1.08 )
APCNet [ 22 ]
79.15 ± 0.85 (+0.00)
80.53 ± 0.18 ( +1.38 )
84.73 ± 0.13 (+0.00)
85.05 ± 0.01 ( +0.32 )
46.46 ± 0.60 (+0.00)
47.94 ± 0.17 ( +1.48 )
OCRNet [ 23 ]
75.39 ± 0.79 (+0.00)
77.88 ± 0.43 ( +2.49 )
82.62 ± 0.11 (+0.00)
83.03 ± 0.12 ( +0.41 )
44.26 ± 0.66 (+0.00)
44.84 ± 0.32 ( +0.58 )
InternImage [ 24 ]
81.95 ± 0.11 (+0.00)
82.35 ± 0.05 ( +0.40 )
86.22 ± 0.08 (+0.00)
86.35 ± 0.00 ( +0.13 )
51.87 ± 0.18 (+0.00)
53.11 ± 0.20 ( +1.24 )
TABLE II: Impact of ShadowCast on training state-of-the-art segmentation models on Vaihingen, Potsdam, and LoveDA.
Augmentation
Vaihingen
Potsdam
LoveDA
No shadow augmentation
77.53 ± 0.30
82.95 ± 0.10
43.29 ± 0.77
RandomShadow [ 13 ]
78.36 ± 0.04
83.15 ± 0.12
43.67 ± 0.40
PlasmaShadow [ 13 ]
76.98 ± 0.19
82.37 ± 0.11
44.01 ± 0.17
SynShadow [ 30 ]
78.18 ± 0.05
83.11 ± 0.14
43.58 ± 0.33
SDAA [ 31 ]
77.87 ± 0.08
83.21 ± 0.12
43.12 ± 0.60
Zhong et al. [ 32 ]
78.07 ± 0.19
83.24 ± 0.12
43.46 ± 0.56
TABLE III: Comparison of ShadowCast with additional shadow augmentation baselines using DeepLabV3+ on Vaihingen, Potsdam, and LoveDA.
Existing method
Vaihingen
Potsdam
LoveDA
Baseline
ShadowCast
Baseline
ShadowCast
Baseline
ShadowCast
Horizontal Flip [00]
78.62 ± 0.19 (+0.00)
79.08 ± 0.06 ( +0.46 )
84.00 ± 0.12 (+0.00)
84.32 ± 0.08 ( +0.32 )
43.81 ± 0.60 (+0.00)
45.88 ± 0.52 ( +2.07 )
Random Resize [00]
80.04 ± 0.38 (+0.00)
80.36 ± 0.02 ( +0.32 )
84.37 ± 0.13 (+0.00)
84.50 ± 0.03 ( +0.13 )
45.11 ± 0.31 (+0.00)
46.70 ± 0.97 ( +1.59 )
Photometric Distortion [00]
77.33 ± 0.35 (+0.00)
77.86 ± 0.12 ( +0.53 )
82.76 ± 0.13 (+0.00)
83.13 ± 0.05 ( +0.37 )
47.19 ± 0.64 (+0.00)
48.45 ± 0.21 ( +1.26 )
CLAHE [ 36 ] [00]
78.33 ± 0.12 (+0.00)
78.46 ± 0.04 ( +0.13 )
83.13 ± 0.25 (+0.00)
83.30 ± 0.27 ( +0.17 )
43.92 ± 0.78 (+0.00)
44.59 ± 0.49 ( +0.67 )
CutOut [ 14 ] [00]
78.29 ± 0.69 (+0.00)
79.18 ± 0.30 ( +0.89 )
83.27 ± 0.03 (+0.00)
83.56 ± 0.07 ( +0.29 )
44.54 ± 0.46 (+0.00)
46.27 ± 0.75 ( +1.73 )
TABLE IV: Impact of combining ShadowCast with existing augmentation/regularization methods on DeepLabV3+ for Vaihingen, Potsdam, and LoveDA.
Dataset
Method
Shadowed
Non-shadowed
Vaihingen
Baseline
57.88 ± 0.95
82.77 ± 0.37
ShadowCast
58.18 ± 0.48 ( +0.30 )
83.26 ± 0.33 ( +0.49 )
Potsdam
Baseline
81.85 ± 0.93
81.50 ± 3.00
ShadowCast
82.27 ± 0.13 ( +0.42 )
82.85 ± 2.07 ( +1.35 )
LoveDA
Baseline
26.83 ± 1.34
38.86 ± 1.48
ShadowCast
27.14 ± 0.71 ( +0.31 )
39.41 ± 1.13 ( +0.55 )
TABLE V: Evaluation of ShadowCast using DeepLab V3+ across shadowed and non-shadowed regions of Vaihingen, Potsdam, and LoveDA (Ten shadow-annotated test images per dataset).
(dmin,dmax)
(δmin,δmax)
η
τ
r
mIoU
(5, 30)
(0.5, 0.8)
15
50
8
78.46 ± 0.19
(5, 20)
(0.5, 0.8)
15
50
8
78.25 ± 0.33
(5, 40)
(0.5, 0.8)
15
50
8
78.22 ± 0.18
(5, 30)
(0.4, 0.7)
15
50
8
78.35 ± 0.12
(5, 30)
(0.6, 0.9)
15
50
8
78.10 ± 0.36
(5, 30)
(0.5, 0.8)
0
50
8
78.20 ± 0.07
TABLE S1: Parameter sensitivity of ShadowCast on the ISPRS Vaihingen benchmark using DeepLabV3+ ( p=0.5 ).
(dmin,dmax)
(δmin,δmax)
η
τ
r
mIoU
(5, 30)
(0.5, 0.8)
15
50
8
83.32 ± 0.09
(5, 20)
(0.5, 0.8)
15
50
8
83.24 ± 0.13
(5, 40)
(0.5, 0.8)
15
50
8
83.27 ± 0.11
(5, 30)
(0.4, 0.7)
15
50
8
83.26 ± 0.12
(5, 30)
(0.6, 0.9)
15
50
8
83.18 ± 0.11
(5, 30)
(0.5, 0.8)
0
50
8
83.22 ± 0.13
TABLE S2: Parameter sensitivity of ShadowCast on the ISPRS Potsdam benchmark using DeepLabV3+ ( p=0.5 ).
(dmin,dmax)
(δmin,δmax)
η
τ
r
mIoU
(5, 30)
(0.5, 0.8)
15
50
8
44.89 ± 0.09
(5, 20)
(0.5, 0.8)
15
50
8
44.15 ± 0.23
(5, 40)
(0.5, 0.8)
15
50
8
44.20 ± 0.21
(5, 30)
(0.4, 0.7)
15
50
8
44.29 ± 0.47
(5, 30)
(0.6, 0.9)
15
50
8
44.21 ± 0.23
(5, 30)
(0.5, 0.8)
0
50
8
44.45 ± 0.30
TABLE S3: Parameter sensitivity of ShadowCast on the LoveDA benchmark using DeepLabV3+ ( p=0.5 ).
Fig. S1: Examples of the manually annotated real shadow regions ( magenta -colored) on (a) Vaihingen, (b) Potsdam, and (c) LoveDA.
Fig. S2: Shadows synthesized by different augmentation methods on the same Vaihingen training image. CLAHE [ 36 ] , which enhances the image rather than synthesizing shadows, is omitted.
Model
Backbone
Optimizer
Initial LR
Weight decay
Minimum LR
DeepLabV3+
ResNet-18
SGD
0.01
5×10−4
10−4
DANet
ResNet-50
SGD
0.01
5×10−4
10−4
APCNet
ResNet-50
SGD
0.01
5×10−4
10−4
OCRNet
HRNet-W18-Small
SGD
0.01
5×10−4
10−4
InternImage
InternImage-T
SGD
0.01
5×10−4
10−4
DOCNet
HRNet-W32
AdamW
10−4
10−4
0
TABLE S4: Training configurations of the segmentation models
Method
Implementation
Parameters
Horizontal Flip
MMSeg
p=0.5
Random Resize
MMSeg
Scale ratio ∼U(0.5,2.0) relative to 512×512 ( 1024×1024 for LoveDA); aspect ratio preserved
Photometric Distortion
MMSeg
Brightness shift ∼U(−32,32) ; contrast and saturation factors ∼U(0.5,1.5) ; integer hue shift ∈{−18,…,17} (OpenCV hue scale); each applied with probability 0.5
CLAHE [ 36 ]
Albumentations
p=0.5 ; clip limit ∼U(1,4) ; 8×8 tiles; applied to the CIELAB lightness channel
CutOut [ 14 ]
MMSeg
p=0.5 ; 5-10 holes of 16×16 or 32×32 pixels; image filled with 0 and labels with the ignore index 255
CutMix [ 15 ]
Custom
p=0.5 ; patch area ratio ∼U(0.2,0.5) ; image and label patches from another training sample
TABLE S5: Settings of the augmentation and regularization methods
Method
Implementation
Parameters
ShadowCast (Ours)
-
p=0.5 ; (dmin,dmax)=(5,30) pixels; (δmin,δmax)=(0.5,0.8) ; η=15∘ ; τ=50 pixels; r=8 pixels; E={Building,Tree} for Vaihingen and Potsdam and {Building,Forest} for LoveDA
RandomShadow [ 13 ]
Albumentations
p=0.5 ; 1 or 2 triangles with vertices sampled over the whole image; shadow intensity U(0.5,0.8)
p=0.5 ; 10 000 rendered mattes of [ 30 ] ; l1∼U(0,0.25) ; s1∼U(0.1,0.9) ; channel offsets ∼N(0.05,0.0252) ; random horizontal flip; minimum matte coverage 0.005; up to 5 trials
SDAA [ 31 ]
Re-implemented
p=0.5 ; mask M from E as in ShadowCast ; direction ∼U(0∘,360∘) for each image; shift ∼U(5,30) pixels; gamma γ∈{0.800,0.825,…,0.975}
Zhong et al. [ 32 ]
Ported
p=0.5 ; one triangle with vertices ∼U(−0.5,1.5) in units of the image height and width; lightness scaled by k∼U(0.2,0.7) ; 3-pixel edge blur; up to 10 trials
TABLE S6: Settings of the shadow augmentation methods
Class
Vaihingen
Potsdam
Class
LoveDA
Baseline
ShadowCast
Baseline
ShadowCast
Baseline
ShadowCast
Non-elevated classes
Impervious surface
83.08 ± 0.17
83.93 ± 0.06 (+0.85)
84.49 ± 0.25
84.87 ± 0.14 (+0.38)
Background
49.30 ± 0.73
50.19 ± 0.12 (+0.89)
Low vegetation
68.44 ± 0.55
69.36 ± 0.60 (+0.92)
73.50 ± 0.25
73.82 ± 0.05 (+0.32)
Road
48.40 ± 0.96
49.24 ± 0.71 (+0.84)
Car
69.48 ± 0.61
71.05 ± 0.19 (+1.57)
89.94 ± 0.24
90.35 ± 0.26 (+0.41)
Water
47.89 ± 1.71
54.39 ± 0.97 (+6.50)
Barren
19.48 ± 0.96
20.38 ± 1.45 (+0.90)
TABLE S7: Per-group/Per-class mIoU of ShadowCast (DeepLabV3+).
Vaihingen
Potsdam
LoveDA
Baseline
77.53 ± 0.30
82.95 ± 0.10
43.29 ± 0.77
ShadowCast (Default: Hard-shadow) ( b=0 )
78.46 ± 0.19
83.32 ± 0.09
44.89 ± 0.09
ShadowCast (Soft-shadow) ( b=1 )
77.79 ± 0.12
82.98 ± 0.13
43.36 ± 0.24
TABLE S8: mIoU (%) of DeepLabV3+ with Hard ( b=0 ) and Soft ( b=1 ) Synthetic Shadows in ShadowCast .
Fig. S3: Hard ( b=0 ) and soft ( b=1 ) synthetic shadow boundaries on a Vaihingen patch. The bottom row enlarges the region marked by the yellow box.
Method
Vaihingen
Potsdam
LoveDA
Baseline
77.53 ± 0.30
82.95 ± 0.10
43.29 ± 0.77
ShadowCast (Default)
78.46 ± 0.19 ( + 0.93)
83.32 ± 0.09 ( + 0.37)
44.89 ± 0.09 ( + 1.60)
ShadowCast (+ Confidence checks)
78.18 ± 0.57 ( + 0.65)
83.22 ± 0.04 ( + 0.27)
43.90 ± 0.30 ( + 0.61)
TABLE S9: Effect of the confidence-gated direction estimation ( τgap=0.03 , τsym=0.10 ) on DeepLabV3+ for the Vaihingen, Potsdam, and LoveDA benchmarks (mIoU, %)
Fig. S4: Representative failure cases of ShadowCast on training images from (a) Vaihingen, (b) Potsdam, and (c) LoveDA; see Gold bounding boxes. The examples show incorrect shadow length and shape, an unclear direction in an already shaded area, and misleading shadows from neighboring objects, respectively.
Limitation
Example
Observed failure
Underlying cause
Shadow length and shape
Fig. S4 (a)
Shadows too short; shape does not follow the object
Same shift range for all object heights; single shift of the top-view mask
Unclear direction
Fig. S4 (b)
Arbitrary direction in an already shaded area
No brightness difference between sides
Neighboring shadows
Fig. S4 (c)
Wrong side appears darkest
No link between shadows and casters; averaging over all objects
TABLE S10: Categorization of the Failure Cases in Fig. S4
Shadows are a prevalent problem in remote sensing imagery (RSI), degrading visual quality and severely limiting the performance of downstream tasks like object detection and semantic segmentation. Most prior works treat shadow detection and removal as separate, cascaded tasks, which can lead to cumbersome process and error accumulation. Furthermore, many deep learning methods rely on paired shadow and non-shadow images for training, which are often unavailable in practice. To address these challenges, we propose Shadow-Aware and Removal Unified (SARU) Framework , a cohesive two-stage framework. First, its dual-branch detection module (DBCSF-Net) fuses multi-color space and semantic features to generate high-fidelity shadow masks, effectively distinguishing shadows from dark objects. Then, leveraging these masks, a novel, training-free physical algorithm (N2SGSR) restores illumination by transferring properties from adjacent non-shadow regions within the single input image. To facilitate rigorous evaluation and foster future work, we also introduce two new benchmark datasets: the RSI Shadow Detection (RSISD) dataset and the Single-image Shadow Removal Benchmark (SiSRB). Extensive experiments on the AISD and RSISD datasets demonstrate that SARU achieves SOTA shadow detection performance. For shadow removal, our training-free N2SGSR algorithm attains an average processing speed of approximately 1.3s, which is over 10 times faster than the SOTA MAOSD while maintains an SRI value close to 0.9 on both the AISD and SiSRB datasets, a level comparable to the advanced RS-GSSR method. By holistically integrating shadow detection and removal to mitigate error propagation and eliminating the dependency on paired training data, SARU establishes a robust, practical framework for real-world RSI analysis. The code and datasets are publicly available at: https://github.com/AeroVILab-AHU/SARU
Zi-Yang Bo, Wei Lu, Hongruixuan Chen +2
MOE Key Lab of ICSP, Anhui Provincial Key Lab of Multimodal Cognitive Computation, IMIS Lab of Anhui Province, School of Computer Science and Technology, Anhui University, Hefei, China · Graduate School of Frontier Sciences, The University of Tokyo, Chiba, 277-8561, Japan
Shadows in remote sensing images obscure surface appearance and disrupt radiometric continuity, reducing the reliability of visual interpretation and downstream analysis. Remote sensing image deshadowing is an ill-posed inverse problem that requires spatially varying illumination recovery while preserving chromatic and radiometric consistency in non-shadow regions. Existing methods commonly rely on hard shadow masks for compensation or directly regress RGB intensities. Hard masks may inadequately model gradual penumbra variations and are sensitive to localization errors, often producing residual shadows or halo artifacts; direct RGB regression entangles illumination recovery with chromatic reconstruction and can introduce color casts. To this end, we propose the Boundary-Reliable Illumination-Color Interaction Network (BRIC-Net), which decouples these failures at different representation levels. A Lightness Reliability Prior (LRP) derives reliability-aware guidance from CIELAB statistics. Boundary-Adaptive Gated Mixing (BAGM) performs gated interpolation between shallow RGB and lightness features around uncertain transitions, while Spatial-Channel Mutual Modulation (SCMM) coordinates deeper spatial and channel responses for appearance-preserving illumination recovery. BRIC-Net achieves 29.46dB full-image peak signal-to-noise ratio (PSNR) on AeroDS-Syn and 27.96dB on SRGTA. It also obtains the lowest Perception-based Image Quality Evaluator (PIQE) scores on AISD and AeroDS-Real. Region-wise evaluations and component ablations further support its effectiveness in shadow recovery and non-shadow preservation.
Wei Lu, Yi Liu, Si-Bao
MOE Key Lab of ICSP, IMIS Lab of Anhui, Anhui Provincial Key Lab of Multimodal Cognitive Computation, Zenmorn-AHU AI Joint Lab, School of Computer Science and Technology, Anhui University, Hefei 230601, China
Remote sensing recognition is often constrained by scarce observations of rare targets and costly annotations, making realistic synthetic augmentation particularly valuable for few-shot and long-tailed scenarios. Object insertion provides an efficient way to increase target diversity while preserving authentic background scenes, but realistic insertion in overhead imagery requires the generated target to adapt coherently to its surrounding environment. To this end, we propose PDA++, a unified environment-aware object insertion framework organized as Plan, Decouple, and Assimilate. Planning determines scene-compatible poses through an affordance field that combines geometric clearance with structure- and scale-aware cues. Decoupling introduces a pose-conditioned background that provides precise spatial guidance together with target-scene context, allowing the reference object to preserve its identity while adapting to the target observation. This construction also naturally provides pixel-level masks for segmentation augmentation. Assimilation further improves local coherence by aligning multi-scale texture distributions through optimal transport. On the optical benchmark, PDA++ achieves a whole-image FID of 6.28 and improves average few-shot recognition mAP50 by 17.69 points, corresponding to a 28.8% relative gain over the real-data baseline. On SAR imagery, it improves ship detection by 4.10 mAP50 points and remains effective under cross-dataset transfer and amorphous-target insertion. Code is available at https://github.com/lisheyu972/PDA_PLUS.