Paper deep dive
After a Decade: Bringing Shadow Removal into the Real World with Agentic Training Data
Shilin Hu, Jingyi Xu, Dimitris Samaras, Hieu Le
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 91%
Last extracted: 10/1/2026, 8:42:13 AM
Summary
This paper introduces AgenticShadow, a dataset of 17,138 image-mask-target triplets for shadow removal, constructed using an offline agentic workflow. The workflow combines physics-motivated generation, failure detection, feedback-driven retry, candidate selection, and deterministic correction to convert existing shadow detection datasets (SBU, CUHK-Shadow, ASFW, S-EO) into paired training data. This approach addresses the decade-old bottleneck of scarce paired training data by generating pseudo shadow-free targets that preserve scene geometry and illumination. The resulting dataset significantly reduces Color Distribution Difference and improves cross-domain generalization for existing shadow removal models.
Entities (21)
Relation Signals (16)
AgenticShadow â constructedfrom â CUHK-Shadow
confidence 95% · AgenticShadow draws from SBU (Vicente et al., 2016), CUHK-Shadow (Hu et al., 2021), ASFW (Luo et al., 2026), and S-EO (Masquil et al., 2025)
AgenticShadow â constructedfrom â ASFW
confidence 95% · AgenticShadow draws from SBU (Vicente et al., 2016), CUHK-Shadow (Hu et al., 2021), ASFW (Luo et al., 2026), and S-EO (Masquil et al., 2025)
AgenticShadow â constructedfrom â S-EO
confidence 95% · AgenticShadow draws from SBU (Vicente et al., 2016), CUHK-Shadow (Hu et al., 2021), ASFW (Luo et al., 2026), and S-EO (Masquil et al., 2025)
AgenticShadow â constructedfrom â SBU
confidence 95% · AgenticShadow draws from SBU (Vicente et al., 2016), CUHK-Shadow (Hu et al., 2021), ASFW (Luo et al., 2026), and S-EO (Masquil et al., 2025)
AgenticShadow â usesworkflow â Agentic workflow
confidence 95% · we propose an offline agentic workflow ... Using this workflow, we construct AgenticShadow
Agentic workflow â usesmetric â Color Distribution Difference
confidence 92% · Our construction workflow reduces Color Distribution Difference by 50.5% over previous shadow removal work
AgenticShadow â improvesperformanceof â PhaSR
confidence 90% · training existing shadow removal models on AgenticShadow reduces cross-domain LAB RMSE by 19.7-37.5% for ... and PhaSR
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Shadow removal looks nearly solved on established benchmarks, yet remains brittle in the real world. Models have advanced; the paired training data they rely on have barely changed in nearly a decade. The reason is simple: obtaining a shadow-free target requires removing the occluder while keeping the scene, camera, and illumination otherwise unchanged, making diverse paired data difficult to capture. Meanwhile, large shadow detection datasets already contain diverse real-world images and masks, but no shadow-free targets. To turn this abundant but incomplete data into paired supervision, we propose an offline agentic workflow combining physics-motivated generation, failure detection, feedback-driven retry, candidate selection, and deterministic correction. Using this workflow, we construct AgenticShadow, a dataset of 17,138 image-mask-target triplets spanning general scenes, faces, and remote sensing. Our construction workflow reduces Color Distribution Difference by 50.5% over previous shadow removal work, while training existing shadow removal models on AgenticShadow reduces cross-domain LAB RMSE by 19.7-37.5%.
Tags
Links
- Source: https://arxiv.org/abs/2609.38607v1
- Canonical: https://arxiv.org/abs/2609.38607v1
Trouble viewing inline? Open PDF directly â
Full Text
75,441 characters extracted from source content.
Expand or collapse full text
After a Decade: Bringing Shadow Removal into the Real World with Agentic Training Data Shilin Hu1 Jingyi Xu1 Dimitris Samaras1 Hieu Le211footnotemark: 1 1 Department of Computer Science Stony Brook University 2 Department of Computer Science University of North Carolina at Charlotte shilhu,jingyixu,samaras@cs.stonybrook.edu hle40@charlotte.edu â thanks: Equal advising. Abstract Shadow removal looks nearly solved on established benchmarks, yet remains brittle in the real world. Models have advanced; the paired training data they rely on have barely changed in nearly a decade. The reason is simple: obtaining a shadow-free target requires removing the occluder while keeping the scene, camera, and illumination otherwise unchanged, making diverse paired data difficult to capture. Meanwhile, large shadow detection datasets already contain diverse real-world images and masks, but no shadow-free targets. To turn this abundant but incomplete data into paired supervision, we propose an offline agentic workflow combining physics-motivated generation, failure detection, feedback-driven retry, candidate selection, and deterministic correction. Using this workflow, we construct AgenticShadow, a dataset of 17,138 image-mask-target triplets spanning general scenes, faces, and remote sensing. Our construction workflow reduces Color Distribution Difference by 50.5% over previous shadow removal work, while training existing shadow removal models on AgenticShadow reduces cross-domain LAB RMSE by 19.7â37.5%. 1 Introduction Shadow removal appears increasingly mature on standard paired benchmarks. On ISTD+ (Wang et al., 2018; Le and Samaras, 2019), several recent methods report relatively small differences among leading approaches with visually near-perfect results (Guo et al., 2023b; Xiao et al., 2024; Xu et al., 2025b; Lee et al., 2026). Yet this performance is limited to the relatively simple cases represented in the dataset and does not carry over reliably to diverse real-world images. Large cast shadows in outdoor scenes, mixed illumination in street imagery, shadows across faces, or aerial scenes with broad occlusions frequently lead to incomplete removal, color shifts, and structural artifacts. The reason is simple: the conditions encountered in practice are much broader than the paired data available for training. Collecting a valid pair requires removing the shadow while keeping the camera, scene geometry, materials, exposure, and other illumination conditions unchanged. This is manageable in controlled capture, but difficult to scale to streets, faces, complex outdoor scenes, or aerial imagery. SRD (Qu et al., 2017) and ISTD (Wang et al., 2018) remain the principal paired datasets used for shadow removal. Later efforts improve different aspects of this data: ISTD+ (Le and Samaras, 2019) corrects color inconsistencies, while SRD+ (Inoue and Yamasaki, 2021) cleans and re-splits SRD. WSRD and WSRD+ (Vasluianu et al., 2023; Vasluianu et al., 2024) provide high-resolution paired imagery through calibrated, close-range indoor capture. Nevertheless, paired acquisition still constrains both scale and domain coverage. The bottleneck is therefore not simply obtaining more shadow images, but obtaining their corresponding shadow-free targets under sufficiently varied conditions. The main contribution of this work is to bridge this decade-old data gap. We do so with a physics-motivated agentic workflow using multimodal foundation models that converts real shadow image-mask pairs into paired training data. Rather than accepting a single prompted edit, the workflow treats generation as a proposal: it evaluates an initial candidate, detects major failures, triggers feedback-guided retries when needed, filters invalid outputs, and selects among valid candidates using visual and structural cues. A final deterministic regional correction reduces residual photometric inconsistencies. This generateâevaluateâretryâselectâcorrect loop produces pseudo shadow-free targets at scale while explicitly controlling the failure modes of generative editing. This process yields AgenticShadow: 17,138 imageâmaskâtarget triplets spanning general scenes, faces, and remote sensing. Crucially, the resulting dataset is not simply larger. It expands the distribution of paired supervision to larger and more spatially distributed shadows, lower-contrast cases, and substantially more heterogeneous correction requirements than established paired benchmarks. Figure 1: From constrained paired capture to diverse real-world supervision. ISTD (Wang et al., 2018) and SRD (Qu et al., 2017) largely reflect constrained paired acquisition with limited scene diversity, while WSRD (Vasluianu et al., 2023) remains centered on controlled, close-range object and surface interactions. AgenticShadow draws from SBU (Vicente et al., 2016), CUHK-Shadow (Hu et al., 2021), ASFW (Luo et al., 2026), and S-EO (Masquil et al., 2025), providing substantially broader scenes, viewpoints, shadow appearances, and application domains. Simply put, our proposed AgenticShadow dataset provides supervision for shadow distributions where paired capture is impractical. Our pseudo targets are not physical ground truth. In unconstrained scenes, however, an exact shadow-free counterpart may be inherently unobtainable: one cannot remove a building to eliminate its shadow for data collection, for example. Even conventional paired capture (Wang et al., 2018) provides only an approximation, since removing or repositioning an occluder can perturb illumination, alignment, or exposure. Our goal is therefore not exact physical reconstruction, but a controlled approximation that preserves scene content while restoring illumination. We enforce this through shadow-formation grounding in generation and evaluation, rejection of candidates that alter scene content or retain shadow-like structure, structural checks for added or lost detail, and regional photometric correction for residual brightness and color errors. These constraints do not guarantee a unique physical solution, but they make the constructed targets sufficiently controlled to serve as supervision. As we show in Section 5.1, the ablations support this design directly: adding these controls progressively improves target quality. Under generic prompting, retry and selection already reduce Color Distribution Difference (CDD), which compares RGB color distributions sampled along the shadow and non-shadow sides of annotated boundaries. Shadow-formation grounding improves every corresponding stage, and structural diagnostics and regional correction further reduce the final error. We validate both the fidelity of the constructed targets and their value as training data. Without training on ISTD+ or access to the references during construction, our agentic workflow produces targets that closely match the color-corrected ISTD+ ground truth, achieving a LAB RMSE of 3.85. On the benchmark introduced in ShadowRemovalRefine (Hu et al., 2025), the workflow reduces CDD by 50.5% relative to the strongest previous method. More importantly, this supervision transfers across architectures, reducing cross-domain macro LAB RMSE by 19.7â37.5% for ShadowDiffusion (Guo et al., 2023b), HomoFormer (Xiao et al., 2024), and PhaSR (Lee et al., 2026). Our main contributions are: âą We introduce AgenticShadow, to our knowledge the largest paired shadow removal benchmark constructed from diverse real-world imagery, with 17,138 triplets spanning general, facial, and remote-sensing domains. âą We develop a physics-motivated agentic data-construction workflow that converts shadow datasets with image-mask pairs into paired removal supervision through failure detection, conditional retry, candidate filtering and selection, structural diagnostics, and deterministic regional correction, making AgenticShadow readily extensible to new data sources. âą We show that AgenticShadow supervision substantially improves cross-domain generalization across existing architectures and enables models with semantic and geometric priorsâincluding a mask-free variantâto operate effectively under substantially broader real-world supervision. 2 Related Work Shadow Removal. Early methods removed shadows using illumination invariance (Finlayson et al., 2002), matting (Wu et al., 2007), texture consistency (Liu and Gleicher, 2008), and relationships between paired shadowed and lit regions (Guo et al., 2013). Learning-based approaches later formulated the task as image restoration through multi-context reasoning (Qu et al., 2017), joint detection and removal (Wang et al., 2018), shadow-image decomposition (Le and Samaras, 2019; Le and Samaras, 2022), and hierarchical feature aggregation (Cun et al., 2020). Recent methods adopt transformer architectures for global-context or homogenized restoration (Guo et al., 2023a; Xiao et al., 2024), inpainting formulations (Li et al., 2023a), diffusion models (Guo et al., 2023b; Xu et al., 2025b), and semantic or geometric priors (Lee et al., 2026). Although these methods improve performance on established benchmarks, their generalization across substantially different scenes and shadow configurations remains underexplored. Shadow Datasets and Benchmarks. Paired benchmarks including SRD (Qu et al., 2017) and ISTD (Wang et al., 2018) provide real shadow and shadow-free pairs but remain modest in scale and limited in their diversity of scenes, viewpoints, and shadow configurations. WSRD (Vasluianu et al., 2023) adds high-resolution pairs but uses a controlled, close-range setup focused on object and surface interactions. Synthetic datasets increase scale through generated shadows (Liu et al., 2021) or fully rendered virtual scenes under direct and indirect illumination (Xu et al., 2025a), but retain a domain gap with real images. Real-world datasets span general scenes in SBU (Vicente et al., 2016) and CUHK-Shadow (Hu et al., 2021), object-shadow associations in SOBA (Wang et al., 2020), documents (Das et al., 2020; Li et al., 2023b), faces (Liu et al., 2022; Luo et al., 2026), videos in ViSha (Chen et al., 2021), and remote-sensing imagery in S-EO (Masquil et al., 2025). However, large detection-oriented collections typically provide only shadow images and masks because capturing shadow-free counterparts is usually impractical. AgenticShadow bridges this gap by combining broad real-world coverage with unified image-mask-target supervision. Generative Editing for Data Construction. Instruction-guided editors enable localized image modifications from natural-language requests (Brooks et al., 2023; Zhang et al., 2023; Sheynin et al., 2024; Zhao et al., 2024), but do not explicitly model shadow formation; their stochastic outputs may preserve shadows, alter scene content, or introduce physically inconsistent changes. Recent work couples image generation with model-based validation and correction for visual data construction (Huang et al., 2026; Park et al., 2026). We adapt this general paradigm to shadow removal through physics-motivated candidate generation and evaluation, failure-driven retry, candidate selection, and deterministic regional correction. 3 Agentic Dataset Construction Given an image I and shadow mask M, we construct a shadow-free target I I while preserving scene geometry, surface detail, and non-shadow appearance. As summarized in Figure 2, GPT Image 2 (OpenAI, 2026) produces candidate edits, while GPT-5 mini (Singh and others, 2026) serves as the vision-language model (VLM) that evaluates major failures, provides feedback for retry, and selects among valid candidates. Detailed prompt designs and pipeline settings are provided in Appendix B.1. Direct validation against color-corrected ISTD+ references is provided in Appendix B.2. Shadow-formation grounding. A shadow represents reduced illumination caused by light occlusion, not a change in the underlying material or scene content. We encode this distinction in both the generation and evaluation prompts. The editor is asked to recover the appearance of the same surface under normal illumination, while the evaluator rejects candidates that reinterpret the shadow as an object, material boundary, or missing content. We compare this physics-motivated formulation with an otherwise identical pipeline using generic shadow removal prompts. Probe-guided conditional generation. The pipeline begins with a mask-guided probe. A major-failure evaluator determines whether the probe retains the shadow by treating it as object-like content or hallucinates new scene content within the masked region. If the probe passes, we retain it and generate two additional guided candidates. If it fails, we discard it and generate three feedback-guided retry candidates from the original image and mask. Candidate filtering and selection. Every candidate entering the selection pool must pass the major-failure evaluator. When multiple candidates remain, the VLM selector compares their shadow removal quality, scene fidelity, detail preservation, and artifact severity, supported by Retinex-LoG structural diagnostics. Because raw gradients are sensitive to illumination, we apply Retinex (Jobson et al., 1997) in the log-luminance domain to suppress slowly varying illumination and use a Laplacian-of-Gaussian (LoG) (Marr and Hildreth, 1980) operator to measure the remaining local structure. For an image X with luminance YXY_X, its Retinex-LoG response is FâĄ(X)=|LoGâĄ(logâĄ(YX+Ï”)âGÏâlogâĄ(YX+Ï”))|.F(X)= |LoG ( (Y_X+Δ)-G_Ï* (Y_X+Δ) ) |. (1) Here, GÏG_Ï estimates smooth illumination, and subtracting it from log-luminance produces a reflectance representation. Let ΩM _M denote the valid pixels obtained by excluding a narrow band around the shadow boundary. Before comparison, both response maps are divided by the 95th-percentile response of the input over ΩM _M and clipped to [0,1][0,1], yielding F~â(I) F(I) and F~â(C) F(C). We then measure the structural discrepancy between candidate C and input I as DRetinexâ-âLoGâ(C,I)=MAEΩMâĄ(F~â(C),F~â(I)).D_Retinex -LoG(C,I)=MAE_ _M ( F(C), F(I) ). (2) A lower discrepancy indicates better local structure preservation. We also measure the mean magnitudes of response decreases and increases to indicate lost and added detail. These diagnostics support, but do not replace, the selectorâs visual judgment. If one candidate passes, it is selected directly; if none pass, a fallback selector returns the least damaging candidate from the generated set. Segmentation-guided regional correction. The selected proposal may remove the shadow successfully while exhibiting broad or regional color shifts. We segment the proposal into class-agnostic regions using CropFormer (Qi et al., 2023). For each region, we compare the input and proposal only at reliable pixels outside a dilated shadow mask and estimate a constant offset from the channel-wise median of their YCbCr differences after outlier filtering. A local offset is applied when the region contains sufficient reliable pixels and improves low-frequency color agreement; otherwise, a global offset is used. Because this stage adjusts only brightness and chrominance, it does not explicitly copy textures, edges, or shadow structure from the input. The corrected image becomes the final target I I. Figure 2: Agentic dataset-construction pipeline. A VLM evaluates an initial mask-guided probe, triggers additional guided edits or feedback-guided retries, filters major failures, and selects a candidate based on visual quality and Retinex-LoG diagnostics. Segmentation-guided regional correction produces the final shadow-free target. The bottom row illustrates a rejected-probe example. 4 AgenticShadow Benchmark Dataset composition. AgenticShadow combines four complementary sources of real shadow images: SBU (Vicente et al., 2016), CUHK-Shadow (Hu et al., 2021), ASFW (Luo et al., 2026), and S-EO (Masquil et al., 2025). We apply the agentic construction workflow described in Section 3 to construct a shadow-free target for each retained image-mask pair. As summarized in Table 1, the resulting benchmark contains 17,138 image-mask-target triplets, divided into 14,117 training and 3,021 test examples. SBU and CUHK-Shadow provide diverse general scenes, while ASFW and S-EO extend the benchmark to facial shadows and remote-sensing imagery. Source processing, cleaning, splits, and retained counts are detailed in Appendix A.1. Table 1: Composition of AgenticShadow. The four source domains provide complementary scene types and together form a benchmark of 17,138 image-mask-target triplets. SBU CUHK ASFW S-EO Total Domain General General Facial Remote sensing â Train 3,974 8,335 928 880 14,117 Test 635 2,087 153 146 3,021 Total 4,609 10,422 1,081 1,026 17,138 (a) Shadow coverage(b) Shadow location (c) Color contrast(d) Correction diversity Figure 3: Dataset diversity compared with ISTD+. (a) Distribution of shadow-mask coverage. (b) Average spatial distribution of shadow masks. (c) Color contrast between shadow and non-shadow regions. (d) Joint distribution of median log-luminance correction and within-shadow heterogeneity. AgenticShadow contains larger and more spatially distributed shadows, more low-contrast cases, and substantially broader and more heterogeneous correction requirements. Benchmark diversity. We compare AgenticShadow with ISTD+ (Le and Samaras, 2019) using four complementary statistics computed over each complete benchmark. Shadow coverage is the fraction of pixels inside the shadow mask, while the location heatmap averages masks after resizing them to common image coordinates. Following the analysis of CUHK-Shadow (Hu et al., 2021), color contrast is measured by the Ï2Ï^2 distance between normalized RGB histograms of shadow and non-shadow pixels. To characterize correction diversity, we compute the signed log-luminance change from each shadow image to its target within the shadow region; its median measures the typical correction, while its median absolute deviation (MAD) measures spatial heterogeneity. As shown in Figure 3, AgenticShadow contains substantially larger shadows, with median coverage of 28.6%28.6\% versus 16.1%16.1\% for ISTD+. Its heatmap shows broader shadow locations, while its lower median color contrast (0.7240.724 versus 0.8490.849) indicates greater coverage of subtle, low-contrast shadows. Finally, its median log-luminance correction increases from 1.511.51 to 1.831.83, while correction heterogeneity increases from 0.1410.141 to 0.3950.395. These results demonstrate that AgenticShadow covers more diverse and spatially varying shadow removal requirements than ISTD+. Additional construction and semantic-diversity statistics are provided in Appendix A.2. Evaluation protocol. We evaluate shadow removal methods separately on the SBU, CUHK-Shadow, ASFW, and S-EO test sets. Because their sizes differ substantially, we report per-domain results and a macro average that assigns equal weight to each domain. We report ISTD+ separately as an established benchmark. Reconstruction quality is measured using PSNR, SSIM, MAE, and LAB RMSE. Checkpoint, inference, and metric details are provided in Appendix C.1. 5 Experiments and Results Implementation Details. We implement the restoration experiments in PyTorch (Paszke et al., 2019) and train on four NVIDIA RTX A6000 GPUs. Our PF baseline combines a pretrained HomoFormer (Xiao et al., 2024) with frozen DINOv2-L/14 (Oquab et al., 2024) and Depth Anything V2-L (Yang et al., 2024) models, using input resolutions of 448 and 518 pixels, respectively. Unless otherwise stated, AgenticShadow-trained models use the natural concatenation of ISTD+ and AgenticShadow. PF is trained for 100 epochs with a total batch size of 16 using Adam (Kingma and Ba, 2017). The backbone and prior-module learning rates start at 10â410^-4 and 3Ă10â43Ă 10^-4 and decay to 10â610^-6 under cosine scheduling. PF-MF follows the same configuration. Additional training details are provided in Appendix C.2, with model complexity and runtime reported in Appendix C.3. Evaluations. We evaluate agentic-construction quality on the 399-image ShadowRemovalRefine benchmark (Hu et al., 2025) using Color Distribution Difference (CDD), which measures color discrepancy across annotated shadow boundaries; lower is better. We compare with SID (Le and Samaras, 2019), ShadowFormer (Guo et al., 2023a), ShadowDiffusion (Guo et al., 2023b), Inpaint4Shadow (Li et al., 2023a), and ShadowRemovalRefine. Because generative editing is stochastic, we evaluate each agentic configuration over two independent full-set runs and average the results. For cross-domain evaluation, we test official ISTD+ checkpoints of SID, ShadowFormer, Inpaint4Shadow, StableSR (Xu et al., 2025b), ShadowDiffusion, HomoFormer, and PhaSR (Lee et al., 2026) across all four AgenticShadow domains. We additionally compare ShadowDiffusion, HomoFormer, and PhaSR with counterparts trained on ISTD+ and AgenticShadow. We report per-domain and macro-average PSNR, SSIM, MAE, and LAB RMSE, with ISTD+ reported separately. 5.1 Agentic Target-Construction Quality (a) Quantitative comparison Method Mean Std Min Max SID (Le and Samaras, 2019) 38.00 45.05 1.66 353.64 SF (Guo et al., 2023a) 33.63 52.74 0.41 427.34 SD (Guo et al., 2023b) 89.72 130.54 0.29 650.26 I4S (Li et al., 2023a) 31.57 48.39 0.43 402.44 SRR (Hu et al., 2025) 14.06 26.08 0.24 215.40 Ours-Physics 6.96 18.59 0.01 158.40 (b) Pipeline ablation Prompt Variant CDD Probe 12.07 Generic Major-retry 11.77 Visual selector 10.33 Probe 9.51 Major-retry 7.78 Physics Visual selector 7.45 Retinex-LoG 7.07 Regional correction 6.96 Table 2: Agentic target-construction quality on SRR (Hu et al., 2025). (a) Comparison with previous shadow removal methods. (b) Ablation of the agentic construction pipeline. CDD values are multiplied by 10310^3, agentic results are averaged over two independent runs, and lower is better. We assess both the final target quality and the contribution of each construction stage on the common normalized SRR benchmark described in Appendix B.3. As shown in Table 2(a), our final physics-motivated pipeline achieves a mean CDD of 0.006960, a 50.5% reduction relative to the strongest previous method, SRR. It also yields the lowest standard deviation and lowest maximum CDD, indicating that the workflow improves average target quality while reducing severe construction failures. See Appendix B.4 for qualitative analyses and Appendix B.5 for limitations. Table 2(b) isolates the contributions of the construction pipeline. Under generic prompting, major-failure retry and visual selection reduce mean CDD from 0.012073 to 0.010334. Shadow-formation grounding consistently outperforms its generic counterpart at the probe, retry, and selection stages, showing that explicitly treating shadows as illumination effects improves both candidate generation and evaluation. Retinex-LoG evidence and regional correction further reduce CDD to 0.006960. Together, these results validate both the agentic control flow and its physics-motivated grounding. 5.2 Prior-Fusion Baseline Figure 4: Prior-Fusion (PF) baseline. Frozen DINOv2 (Oquab et al., 2024) and Depth Anything V2 (Yang et al., 2024) extract semantic and geometric priors from the shadow image. Learned projections align these priors with intermediate features, and zero-initialized residual fusion incorporates them at the 24Ă2424Ă 24 bottleneck input and the first 48Ă4848Ă 48 decoder stage. (a) Datasetâprior interaction ISTD+ AgenticShadow Model PSNRâ LABâ PSNRâ LABâ HomoFormerâ 32.53 1.92 18.85 8.43 PFâ 32.95 1.87 18.70 8.55 HomoFormer 32.92 1.85 21.95 5.87 PF 32.74 1.86 22.50 5.55 (b) Prior-component ablation AgenticShadow Variant (E50) PSNRâ SSIMâ MAEâ LABâ HomoFormer 21.90 0.7161 15.36 5.912 Depth only 22.13 0.7259 14.96 5.769 Semantic only 22.46 0.7306 14.42 5.585 PF 22.47 0.7312 14.40 5.577 Table 3: Analysis of the Prior-Fusion baseline. (a) Interaction between training data and prior fusion, comparing ISTD+-only training with combined ISTD+ and AgenticShadow training; â denotes the former. (b) Matched E50 prior ablation initialized from HomoFormer E100 (Xiao et al., 2024). AgenticShadow results are four-domain macro averages. To examine whether broader paired supervision enables more effective use of external priors, we construct a Prior-Fusion (PF) baseline based on HomoFormer (Xiao et al., 2024). Given a shadow image x and mask m, PF predicts a shadow-free image in one feed-forward pass while incorporating frozen semantic and geometric features, as illustrated in Figure 4. This deliberately simple design provides a controlled way to evaluate how training supervision affects the utility of external priors. Prior extraction and fusion. We extract semantic features using DINOv2 (Oquab et al., 2024) and relative depth using Depth Anything V2 (Yang et al., 2024), keeping both models frozen. A learned 1Ă11Ă 1 projection and spatial resizing align the semantic features, while a lightweight convolutional pyramid projects the depth map. Let PrsemP_r^sem and PrgeoP_r^geo denote the resulting features at resolution rĂrĂ r. They are fused with HomoFormer tokens HrH_r through H~r=Hr+αrâÏâ(Prsem)+ÎČrâÏâ(Prgeo),râ24,48, H_r=H_r+ _r\,Ï\! (P_r^sem )+ _r\,Ï\! (P_r^geo ), râ\24,48\, (3) where ÏâĄ(â )Ï(·) converts feature maps into tokens, and αr _r and ÎČr _r are learned scalar strengths initialized to zero. Fusion is applied before the 24Ă2424Ă 24 bottleneck and at the first 48Ă4848Ă 48 decoder stage. Training and variants. The prior extractors remain fixed, while the backbone, projections, and fusion strengths are optimized using the Charbonnier loss (Charbonnier et al., 1994). We additionally evaluate semantic-only and depth-only variants. PF-MF removes the mask input and its reinjection at the final decoder and output stages while retaining the same prior-fusion design. Table 3(a) shows that prior fusion alone is insufficient for generalization. Under ISTD+-only training, PF improves in-domain performance but not AgenticShadow results. With combined ISTD+ and AgenticShadow supervision, the same priors provide clear AgenticShadow gains while retaining comparable ISTD+ performance, indicating that broader supervision is needed to translate external priors into transferable improvements. Table 3(b) provides a matched E50 component analysis initialized from HomoFormer E100. Both priors independently improve the backbone across all metrics. Their combination performs best overall: semantic information provides the larger gain, while relative depth contributes complementary geometric context. 5.3 Cross-Domain Benchmark Evaluation Table 4: Cross-domain shadow removal evaluation. Official ISTD+ checkpoints are evaluated without adaptation, while â denotes training with both ISTD+ and AgenticShadow. We report per-domain LAB RMSE and equal-weight macro averages across the four AgenticShadow domains. ISTD+ is reported separately. Best and second-best results are bolded and underlined, respectively. ISTD+ AgenticShadow: LAB RMSE â AgenticShadow: Macro Method LAB â SBU CUHK ASFW S-EO PSNR â SSIM â MAE â LAB â Official ISTD+ checkpoints SID (Le and Samaras, 2019) 2.89 7.25 10.86 7.48 10.23 18.28 0.6404 23.77 8.96 ShadowFormer (Guo et al., 2023a) 1.95 6.63 10.01 7.35 10.74 18.57 0.6592 23.36 8.68 Inpaint4Shadow (Li et al., 2023a) 2.77 7.12 9.72 7.58 10.08 18.59 0.6119 23.06 8.63 StableSR (Xu et al., 2025b) 2.03 7.32 8.84 10.01 10.93 17.90 0.6506 25.23 9.28 ShadowDiffusion (Guo et al., 2023b) 1.94 6.83 9.09 7.47 10.50 18.72 0.6563 22.67 8.47 PhaSR (Lee et al., 2026) 2.13 7.32 8.71 10.36 10.92 17.90 0.6556 24.75 9.33 HomoFormer (Xiao et al., 2024) 1.92 6.78 9.08 7.00 10.87 18.85 0.6597 22.36 8.43 With AgenticShadow supervision ShadowDiffusionâ 2.06 5.84 7.40 5.97 7.98 20.47 0.6952 18.58 6.80 PhaSRâ 2.11 4.92 6.19 5.31 6.90 22.06 0.7309 15.44 5.83 HomoFormerâ 1.85 4.90 6.23 5.33 7.02 21.95 0.7181 15.25 5.87 PF 1.86 4.73 6.05 4.67 6.76 22.50 0.7314 14.36 5.55 PF-MF 1.95 4.75 6.11 4.97 6.78 22.36 0.7303 14.67 5.65 InputMaskHomoFormerHomoFormerâ PhaSRPhaSRâ PFTarget Figure 5: Qualitative cross-domain comparison. We compare HomoFormer (Xiao et al., 2024) and PhaSR (Lee et al., 2026), their counterparts trained with AgenticShadow (â ), and PF. Models pretrained on ISTD+ (Le and Samaras, 2019) often leave residual shadows or color shifts on diverse AgenticShadow scenes, while training with AgenticShadow substantially improves removal. PF consistently produces outputs closer to the targets than the AgenticShadow-trained counterparts. Colored insets show mean absolute RGB error using a shared scale. We first evaluate official ISTD+ checkpoints on the four AgenticShadow domains without adaptation, exposing their cross-domain limitations. We then retrain ShadowDiffusion, HomoFormer, and PhaSR using ISTD+ and AgenticShadow to measure the effect of broader supervision. PF follows the same combined-data setting as its HomoFormer backbone. As shown in Table 4, official checkpoints obtain macro LAB RMSE values of 8.43â9.33. AgenticShadow supervision reduces this range to 5.83â6.80 for the three retrained architectures, demonstrating a substantial generalization benefit from the additional data. PF performs best across every AgenticShadow domain and all macro metrics while remaining competitive on ISTD+. Complete per-domain and cross-dataset results appear in Appendix D.1 and Appendix D.2. Figure 5 provides a visual counterpart to these results. Official ISTD+ checkpoints frequently retain shadows or introduce color shifts on unfamiliar scenes, while AgenticShadow-trained counterparts produce substantially cleaner outputs across general, facial, and remote-sensing imagery. PF further improves target agreement in the selected cases, consistent with the quantitative evaluation. 5.4 Mask-Free and Generalization We evaluate PF-MF to assess whether AgenticShadow supervision and external priors reduce reliance on annotated masks. As shown in Table 4, it closely matches PF, trailing by only 0.14 dB PSNR and 0.10 LAB RMSE. Figure 6 shows video generalization: PF produces cleaner removal than pretrained HomoFormer on ViSha (Chen et al., 2021) using masks, while PF-MF operates directly on SBU-TimeLapse (Le and Samaras, 2022) frames without masks and outperforms SP+M+I-Net. These results support video use where frame-level shadow masks are unavailable; complete videos and further qualitative comparisons are provided in Appendix D.3. (a) PF on ViSha (b) PF-MF on SBU-TimeLapse Figure 6: Generalization to shadow videos. (a) PF is compared with pretrained HomoFormer (Xiao et al., 2024) on ViSha (Chen et al., 2021) using the provided masks. (b) PF-MF is compared with SP+M+I-Net on SBU-TimeLapse (Le and Samaras, 2022) without input masks. In both settings, PF and PF-MF produce cleaner and more complete shadow removal than the compared methods. 6 Conclusion We introduced AgenticShadow, a benchmark of 17,138 image-mask-target triplets constructed from diverse real shadow images through a physics-motivated agentic workflow. Our evaluation validates the constructed targets, shows that AgenticShadow offers substantially greater cross-domain diversity than existing paired benchmarks, and demonstrates that its supervision consistently improves representative shadow removal architectures. We also study a simple Prior-Fusion baseline, which achieves the strongest overall performance across the four AgenticShadow domains; its mask-free variant remains competitive and extends shadow removal to settings without annotated masks. Together, these results establish AgenticShadow as a resource for robust real-world shadow removal. AI Use Statement Generative AI is part of our dataset-construction workflow. GPT Image 2 performs image normalization and generates candidate targets, while GPT-5 mini evaluates failures, guides retries, and selects candidates. Generative AI also assisted with pipeline implementation, experimental analysis, preparation of supporting artifacts, and manuscript editing. The authors reviewed all AI-assisted outputs, verified the reported results, and checked manuscript edits for accuracy. The authors take full responsibility for the final content of this work. References Brooks et al. (2023) T. Brooks, A. Holynski, and A. A. Efros InstructPix2Pix: learning to follow image editing instructions. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 18392â18402. External Links: Document Cited by: §2. Charbonnier et al. (1994) P. Charbonnier, L. Blanc-FĂ©raud, G. Aubert, and M. Barlaud Two deterministic half-quadratic regularization algorithms for computed imaging. In Proceedings of the IEEE International Conference on Image Processing, Vol. 2, p. 168â172. External Links: Document Cited by: §C.2, §5.2. Chen et al. (2021) Z. Chen, L. Wan, L. Zhu, J. Shen, H. Fu, W. Liu, and J. Qin Triple-cooperative video shadow detection. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 2714â2723. External Links: Document Cited by: §D.3, §2, Figure 6, §5.4. Cun et al. (2020) X. Cun, C. Pun, and C. Shi Towards ghost-free shadow removal via dual hierarchical aggregation network and shadow matting GAN. In Proc. AAAI Conf. Artif. Intell., Vol. 34, p. 10680â10687. External Links: Document Cited by: §2. Das et al. (2020) S. Das, H. A. Sial, K. Ma, R. Baldrich, M. Vanrell, and D. Samaras Intrinsic decomposition of document images in-the-wild. In Proc. Brit. Mach. Vis. Conf. (BMVC), External Links: Document Cited by: §2. Finlayson et al. (2002) G. D. Finlayson, S. D. Hordley, and M. S. Drew Removing shadows from images. In Proc. Eur. Conf. Comput. Vis. (ECCV), p. 823â836. External Links: Document Cited by: §2. Guo et al. (2023a) L. Guo, S. Huang, D. Liu, H. Cheng, and B. Wen ShadowFormer: global context helps shadow removal. In Proc. AAAI Conf. Artif. Intell., Vol. 37, p. 710â718. External Links: Document Cited by: §B.5, Table 8, Figure 16, Table 10, Table 11, §2, Table 2, Table 4, §5. Guo et al. (2023b) L. Guo, C. Wang, W. Yang, S. Huang, Y. Wang, H. Pfister, and B. Wen ShadowDiffusion: when degradation prior meets diffusion model for shadow removal. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 14049â14058. External Links: Document Cited by: §B.5, Table 8, Table 9, Figure 16, Table 10, Table 11, §1, §1, §2, Table 2, Table 4, §5. Guo et al. (2013) R. Guo, Q. Dai, and D. Hoiem Paired regions for shadow detection and removal. IEEE Trans. Pattern Anal. Mach. Intell. 35 (12), p. 2956â2967. External Links: Document Cited by: §2. Hu et al. (2025) S. Hu, H. Le, S. Athar, S. Das, and D. Samaras Shadow removal refinement via material-consistent shadow edges. In Proc. IEEE/CVF Winter Conf. Appl. Comput. Vis. (WACV), p. 2631â2641. External Links: Document Cited by: §B.3, §B.5, §1, Table 2, Table 2, Table 2, §5. Hu et al. (2021) X. Hu, T. Wang, C. Fu, Y. Jiang, Q. Wang, and P. Heng Revisiting shadow detection: a new benchmark dataset for complex world. IEEE Trans. Image Process. 30, p. 1925â1934. External Links: Document Cited by: §A.1, Figure 1, §2, §4, §4. Huang et al. (2026) J. Huang, I. Fang, T. Huang, Y. Liu, C. Wang, and J. Chen Gen-n-val: agentic image data generation and validation. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. Findings (CVPR Findings), p. 8786â8795. Cited by: §2. Inoue and Yamasaki (2021) N. Inoue and T. Yamasaki Learning from synthetic shadows for shadow detection and removal. IEEE Transactions on Circuits and Systems for Video Technology 31 (11), p. 4187â4197. External Links: Document Cited by: §1. Jobson et al. (1997) D. J. Jobson, Z. Rahman, and G. A. Woodell Properties and performance of a center/surround retinex. IEEE Transactions on Image Processing 6 (3), p. 451â462. External Links: Document Cited by: §3. Kingma and Ba (2017) D. P. Kingma and J. Ba Adam: a method for stochastic optimization. External Links: Document, 1412.6980 Cited by: §5. Le and Samaras (2019) H. Le and D. Samaras Shadow removal via shadow image decomposition. In Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV), p. 8577â8586. External Links: Document Cited by: §A.2, §B.2, §B.5, Table 8, Figure 16, Table 10, Table 11, §1, §1, §2, §4, Figure 5, Table 2, Table 4, §5. Le and Samaras (2022) H. Le and D. Samaras Physics-based shadow image decomposition for shadow removal. IEEE Trans. Pattern Anal. Mach. Intell. 44 (12), p. 9088â9101. External Links: Document Cited by: §D.3, §2, Figure 6, §5.4. Lee et al. (2026) C. Lee, Y. Lin, Y. Hsiao, J. Jiang, Y. Liu, and C. Hsu PhaSR: generalized image shadow removal with physically aligned priors. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 22679â22688. Cited by: Table 8, Table 9, Figure 17, Figure 18, Table 10, Table 11, Table 12, §1, §1, §2, Figure 5, Table 4, §5. Li et al. (2023a) X. Li, Q. Guo, R. Abdelfattah, D. Lin, W. Feng, I. Tsang, and S. Wang Leveraging inpainting for single-image shadow removal. In Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV), p. 13009â13018. External Links: Document Cited by: §B.5, Table 8, Figure 16, Table 10, Table 11, §2, Table 2, Table 4, §5. Li et al. (2023b) Z. Li, X. Chen, C. Pun, and X. Cun High-resolution document shadow removal via a large-scale real-world dataset and a frequency-aware shadow erasing net. In Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV), p. 12449â12458. Cited by: §2. Liu and Gleicher (2008) F. Liu and M. Gleicher Texture-consistent shadow removal. In Proc. Eur. Conf. Comput. Vis. (ECCV), p. 437â450. External Links: Document Cited by: §2. Liu et al. (2022) Y. Liu, A. Hou, X. Huang, L. Ren, and X. Liu Blind removal of facial foreign shadows. In Proc. Brit. Mach. Vis. Conf. (BMVC), Cited by: §2. Liu et al. (2021) Z. Liu, H. Yin, X. Wu, Z. Wu, Y. Mi, and S. Wang From shadow generation to shadow removal. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 4927â4936. External Links: Document Cited by: §2. Luo et al. (2026) T. Luo, Y. Dong, J. Bai, J. Huang, J. Xia, W. Wu, and X. Chen Beyond shadows: a large-scale benchmark and multi-stage framework for high-fidelity facial shadow removal. In ICASSP 2026 - 2026 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), External Links: Document Cited by: §A.1, Figure 1, §2, §4. Marr and Hildreth (1980) D. Marr and E. Hildreth Theory of edge detection. Proceedings of the Royal Society of London. Series B, Biological Sciences 207 (1167), p. 187â217. External Links: Document Cited by: §3. Masquil et al. (2025) E. Masquil, R. MarĂ, T. Ehret, E. Meinhardt-Llopis, P. MusĂ©, and G. Facciolo S-EO: a large-scale dataset for geometry-aware shadow detection in remote sensing applications. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. Workshops (CVPRW), p. 2408â2418. Cited by: §A.1, Figure 1, §2, §4. OpenAI (2026) OpenAI Models. Note: https://platform.openai.com/docs/modelsOpenAI API documentation, accessed July 12, 2026 Cited by: §B.1, §3. Oquab et al. (2024) M. Oquab, T. Darcet, T. Moutakanni, H. V. Vo, M. Szafraniec, V. Khalidov, P. Fernandez, D. Haziza, F. Massa, A. El-Nouby, M. Assran, N. Ballas, W. Galuba, R. Howes, P. Huang, S. Li, I. Misra, M. Rabbat, V. Sharma, G. Synnaeve, H. Xu, H. JĂ©gou, J. Mairal, P. Labatut, A. Joulin, and P. Bojanowski DINOv2: learning robust visual features without supervision. Trans. Mach. Learn. Res.. External Links: ISSN 2835-8856, Link Cited by: §A.2, Figure 4, §5.2, §5. Park et al. (2026) J. Park, M. Ahn, M. Kim, J. Lee, J. Lee, and D. Park See and fix the flaws: enabling VLMs and diffusion models to comprehend visual artifacts via agentic data synthesis. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 35810â35820. Cited by: §2. Paszke et al. (2019) A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Köpf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, and S. Chintala PyTorch: an imperative style, high-performance deep learning library. In Adv. Neural Inf. Process. Syst. (NeurIPS), Vol. 32. External Links: Document, 1912.01703 Cited by: §5. Qi et al. (2023) L. Qi, J. Kuen, T. Shen, J. Gu, W. Li, W. Guo, J. Jia, Z. Lin, and M. Yang High quality entity segmentation. In Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV), p. 4047â4056. Cited by: §B.4, §3. Qu et al. (2017) L. Qu, J. Tian, S. He, Y. Tang, and R. W. H. Lau DeshadowNet: a multi-context embedding deep network for shadow removal. In Proc. IEEE Conf. Comput. Vis. Pattern Recog. (CVPR), p. 2308â2316. External Links: Document Cited by: Figure 1, §1, §2, §2. Sheynin et al. (2024) S. Sheynin, A. Polyak, U. Singer, Y. Kirstain, A. Zohar, O. Ashual, D. Parikh, and Y. Taigman Emu edit: precise image editing via recognition and generation tasks. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 8871â8879. External Links: Document Cited by: §2. Singh et al. (2026) A. Singh et al. OpenAI GPT-5 System Card. External Links: 2601.03267, Link Cited by: §B.1, §3. Vasluianu et al. (2023) F. Vasluianu, T. Seizinger, and R. Timofte WSRD: a novel benchmark for high resolution image shadow removal. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. Workshops (CVPRW), p. 1826â1835. Cited by: Figure 1, §1, §2. Vasluianu et al. (2024) F. Vasluianu, T. Seizinger, Z. Zhou, Z. Wu, C. Chen, R. Timofte, et al. NTIRE 2024 image shadow removal challenge report. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. Workshops (CVPRW), p. 6547â6570. External Links: Document Cited by: §1. Vicente et al. (2016) T. F. Y. Vicente, L. Hou, C. Yu, M. Hoai, and D. Samaras Large-scale training of shadow detectors with noisily-annotated shadow examples. In Proc. Eur. Conf. Comput. Vis. (ECCV), p. 816â832. External Links: Document Cited by: §A.1, Figure 1, §2, §4. Wang et al. (2018) J. Wang, X. Li, and J. Yang Stacked conditional generative adversarial networks for jointly learning shadow detection and shadow removal. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 1788â1797. External Links: Document Cited by: Figure 1, §1, §1, §1, §2, §2. Wang et al. (2020) T. Wang, X. Hu, Q. Wang, P. Heng, and C. Fu Instance shadow detection. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 1877â1886. External Links: Document Cited by: §2. Wu et al. (2007) T. Wu, C. Tang, M. S. Brown, and H. Shum Natural shadow matting. ACM Trans. Graph. 26 (2), p. 8. External Links: Document Cited by: §2. Xiao et al. (2024) J. Xiao, X. Fu, Y. Zhu, D. Li, J. Huang, K. Zhu, and Z. Zha HomoFormer: homogenized transformer for image shadow removal. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 25617â25626. Cited by: Table 8, Table 9, Figure 18, §D.3, Table 10, Table 11, §1, §1, §2, Figure 5, Figure 6, §5.2, Table 3, Table 4, §5. Xu et al. (2025a) J. Xu, Z. Li, Y. Zheng, C. Huang, R. Gu, W. Xu, and G. Xu OmniSR: shadow removal under direct and indirect lighting. In Proceedings of the AAAI Conference on Artificial Intelligence, p. 8887â8895. External Links: Document Cited by: Table 8, Figure 17, §D.2, Table 12, §2. Xu et al. (2025b) J. Xu, Y. Zheng, Z. Li, C. Wang, R. Gu, W. Xu, and G. Xu Detail-preserving latent diffusion for stable shadow removal. In Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recog. (CVPR), p. 7592â7602. Cited by: Table 8, Figure 17, Table 10, Table 11, Table 12, §1, §2, Table 4, §5. Yang et al. (2023) H. Yang, T. Wang, X. Hu, and C. Fu SILT: shadow-aware iterative label tuning for learning to detect shadows from noisy labels. In Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV), p. 12641â12652. External Links: Document Cited by: §A.1. Yang et al. (2024) L. Yang, B. Kang, Z. Huang, Z. Zhao, X. Xu, J. Feng, and H. Zhao Depth anything v2. In Advances in Neural Information Processing Systems, Vol. 37, p. 21875â21911. External Links: Document Cited by: Figure 4, §5.2, §5. Zhang et al. (2023) K. Zhang, L. Mo, W. Chen, H. Sun, and Y. Su MagicBrush: a manually annotated dataset for instruction-guided image editing. In Adv. Neural Inf. Process. Syst. (NeurIPS), Vol. 36, p. 31428â31449. External Links: Document Cited by: §2. Zhao et al. (2024) H. Zhao, X. Ma, L. Chen, S. Si, R. Wu, K. An, P. Yu, M. Zhang, Q. Li, and B. Chang UltraEdit: instruction-based fine-grained image editing at scale. In Adv. Neural Inf. Process. Syst. (NeurIPS), Vol. 37, p. 3058â3093. External Links: Document Cited by: §2. Appendix A AgenticShadow Dataset Details A.1 Source Processing, Cleaning, and Splits AgenticShadow is constructed from four existing shadow-image sources: SBU (Vicente et al., 2016), CUHK-Shadow (Hu et al., 2021), ASFW (Luo et al., 2026), and S-EO (Masquil et al., 2025). Because these sources differ in organization, annotation format, and image quality, we process each separately before target construction. For SBU, we pair the original images with the refined training masks and relabeled test masks released by SILT (Yang et al., 2023). For CUHK-Shadow, we retain only pairs listed in the official training, validation, and test manifests. Duplicate review excludes 102 SBU and 70 CUHK-Shadow examples. To place the heterogeneous SBU and CUHK-Shadow images on a common resolution and quality level, we apply the image-normalization procedure described in Appendix B.3. Seven SBU images are excluded because normalization is blocked by content moderation. ASFW already provides aligned 512Ă512512Ă 512 image-mask pairs and therefore requires no normalization. The S-EO release provides RGB images and Min-DSM-derived shadow annotations in separate archives. We match them by AOI and view identifiers, obtaining 19,162 pairs from 20,275 RGB images and 19,163 complete mask groups. Because many S-EO views contain large empty or invalid zero-valued regions within the AOI, we prioritize candidate crops with the highest valid-image coverage for visual review, aided by the released uncertainty, unseen-pixel, and vegetation annotations. We visually inspect 1,119 candidate crops and retain 1,026 after rejecting candidates with poor image or shadow mask quality and removing overlapping selections. As summarized in Table 5, we produce 17,151 usable image-mask pairs before target generation. Candidate generation excludes five SBU and five CUHK-Shadow examples, while regional correction excludes three additional CUHK-Shadow examples, yielding the final 17,138 triplets. SBU and ASFW retain their source splits. For CUHK-Shadow, the official validation set is assigned to training, while the test split is preserved. S-EO uses an AOI-disjoint split with 152 training and 25 test AOIs, ensuring that all crops and source views from each AOI remain in the same split. Duplicate review is completed before split finalization to prevent train-test overlap. Table 5: AgenticShadow processing and retention. Eligible denotes matched source image-mask pairs, selected denotes examples retained after duplicate review or crop selection, usable denotes inputs ready for target construction after source-specific preprocessing, and generated denotes successful target generation before regional correction. Final triplets Source Eligible Selected Usable Generated Train Test Total SBU 4,723 4,621 4,614 4,609 3,974 635 4,609 CUHK 10,500 10,430 10,430 10,425 8,335 2,087 10,422 ASFW 1,081 1,081 1,081 1,081 928 153 1,081 S-EO 19,162 1,026 1,026 1,026 880 146 1,026 Total 35,466 17,158 17,151 17,141 14,117 3,021 17,138 A.2 Construction and Diversity Statistics Construction outcomes. We retain the generation and evaluation decisions for every constructed case. As shown in Table 6, the initial probe passes the major-failure evaluator for 97.93% of generated targets, while 2.07% enter the feedback-guided retry branch. After candidate filtering, 99.52% of cases contain at least two valid candidates for Retinex-LoG-supported selection. Only 68 cases contain a single passing candidate, and 15 cases use the least-damaging fallback because no candidate passes the major-failure evaluator. For the largest source, CUHK-Shadow, we track $822.06 in API cost for generating 10,425 targets, including retries, averaging approximately $0.079 per target. Subsequent segmentation, correction, and auditing are performed locally. Semantic scene diversity. We compare the semantic diversity of AgenticShadow and ISTD+ (Le and Samaras, 2019) using normalized CLS embeddings from frozen DINOv2-L/14 (Oquab et al., 2024). Figure 7(a) jointly projects all 14,117 AgenticShadow and 1,330 ISTD+ training images using PCA. AgenticShadow occupies a visibly broader embedding space, with facial and remote-sensing imagery extending into distinct semantic regions. Because visual coverage grows with dataset size, we use a size-controlled comparison in Figure 7(b). We sample 1,000 images without replacement from each dataset and compute the mean pairwise cosine distance in the original DINOv2 embedding space, repeating this procedure 100 times. A larger distance means that two randomly selected images are less semantically similar and therefore indicates greater scene diversity. AgenticShadow obtains 0.9413±0.00200.9413± 0.0020, compared with 0.7487±0.00320.7487± 0.0032 for ISTD+, where values denote the mean and standard deviation across 100 resamples, corresponding to a 25.7% increase. Table 6: Dataset-wide target-construction outcomes. Pass and retry describe the initial routing decision. Multi, single, and fallback are mutually exclusive selection outcomes. Percentages are computed within each source and overall. Probe routing Final selection Source Generated Pass Retry Multi Single Fallback SBU 4,609 4,500 109 4,588 19 2 (97.64%) (2.36%) (99.54%) (0.41%) (0.04%) CUHK 10,425 10,193 232 10,364 48 13 (97.77%) (2.23%) (99.41%) (0.46%) (0.12%) ASFW 1,081 1,081 0 1,081 0 0 (100%) (0%) (100%) (0%) (0%) S-EO 1,026 1,013 13 1,025 1 0 (98.73%) (1.27%) (99.90%) (0.10%) (0%) Total 17,141 16,787 354 17,058 68 15 (97.93%) (2.07%) (99.52%) (0.40%) (0.09%) (a) DINOv2 embedding space(b) Size-controlled diversity Figure 7: Semantic scene diversity compared with ISTD+. (a) Joint PCA visualization of DINOv2-L/14 embeddings for all training images. (b) Mean pairwise DINOv2 cosine distance over 100 size-matched resamples of 1,000 images; higher values indicate greater semantic diversity. Distances are computed in the original embedding space rather than the two-dimensional projection. Appendix B Agentic Construction Details B.1 Prompt Design and Pipeline Settings The pipeline uses GPT Image 2 (OpenAI, 2026) for candidate generation and GPT-5 mini (Singh and others, 2026) for evaluation and selection. Each case starts with one mask-guided probe. Passing probes are retained and followed by two additional candidates, for three editing calls total; rejected probes are replaced by three retries using evaluator feedback, for four calls total. Every candidate undergoes the same major-failure evaluation. A single passing candidate is selected directly, multiple passing candidates are compared using visual assessment supported by Retinex-LoG diagnostics, and if none pass, the least-damaging fallback selector is used. Figure 8: Generic prompting and physics-motivated additions. Both settings use identical inputs, preservation requirements, evaluator schemas, and agentic control flow. Physics-motivated prompting additionally defines cast and attached shadows as illumination effects caused by light occlusion and provides type-specific guidance for preserving the underlying surface or object. The two prompt families differ only in their shadow-formation grounding, as summarized in Figure 8. The generic prompts request shadow removal while preserving scene structure, object identity, materials, texture, markings, and local color. The physics-motivated prompts retain these requirements and additionally distinguish cast shadows on receiving surfaces from attached or self-shadows on the same object. This grounding is applied consistently to generation, retry, evaluation, and selection. The evaluator schema remains unchanged and rejects only two major failures: preserving a substantial shadow as coherent scene content or hallucinating semantic content inside the mask. This controlled design isolates the effect of shadow-formation grounding from the agentic control flow. B.2 Validation against Captured ISTD+ References We first test whether the construction workflow can recover known paired targets by applying it to all 540 ISTD+ test images and masks (Le and Samaras, 2019). The workflow receives only the shadow image and mask, uses no ISTD+ reference during construction, and receives no task-specific training on ISTD+. We apply the same candidate generation, evaluation, Retinex-LoG-supported selection, and segmentation-guided regional correction used to construct AgenticShadow. Against the color-corrected ISTD+ references, the resulting targets achieve 25.11 PSNR, 0.7380 SSIM, 10.95 MAE, and 3.85 LAB RMSE. This direct comparison shows that the workflow can approximate the color-corrected ISTD+ references without using them during construction. Representative cases are shown in Figure 9. The top row presents low-error cases with shallow and stronger shadows, showing close agreement with the references across different shadow intensities. The bottom row presents higher-error cases with larger differences in local color and fine appearance. Nevertheless, the dominant shadows are removed while the overall scene content remains consistent. InputConstructedReferenceError InputConstructedReferenceError Figure 9: Construction against captured ISTD+ references. Each group shows the shadow input, our constructed target, the color-corrected ISTD+ reference, and the mean absolute RGB error map using a shared 0â50 scale. The top row presents two low-error cases, while the bottom row presents two higher-error cases that expose remaining texture, detail, and color discrepancies. B.3 Image Normalization and API Usage Because the source images vary substantially in resolution and image quality, we use a preprocessing-only GPT Image 2 pass to produce standardized 512Ă512512Ă 512 images while preserving the scene and original shadow appearance. The normalization prompt explicitly prohibits shadow removal, relighting, reframing, scene modification, or object addition and removal. For the ShadowRemovalRefine (SRR) benchmark (Hu et al., 2025), we apply this procedure to each image and spatially align its mask to the normalized output. OriginalNormalized 512Ă512512Ă 512OriginalNormalized 512Ă512512Ă 512 Figure 10: Image normalization examples. The first three pairs show low-resolution inputs standardized to 512Ă512512Ă 512, while the last pair shows a higher-resolution input normalized to the same resolution. The preprocessing pass improves resolution and image quality while preserving the scene and original shadow appearance. SRR originally contains 400 images with diverse resolutions and aspect ratios. One image is excluded after an API moderation block, leaving 399 evaluation cases. As illustrated in Figure 10, each image is normalized before candidate generation. All compared methods and agentic configurations receive the same normalized images and aligned masks, ensuring consistent quantitative comparisons. Table 7: API usage for complete SRR runs. Each run processes all 399 evaluation cases. Pass and retry indicate the routing decision for the initial probe. Edits include the probe and subsequent guided or retry candidates, and each edit receives one major-failure evaluation. Selector counts exclude cases with exactly one passing candidate, which are selected directly. Prompt setting Cases Pass Retry Edits Evaluations Selectors Generic 399 391 8 1,205 1,205 394 Physics-motivated 399 389 10 1,207 1,207 397 Table 7 summarizes the API calls required by complete generic and physics-motivated runs. Their similar usage reflects the identical control flow, with shadow-formation grounding as the principal difference. The agentic workflow is intended for offline target construction rather than direct deployment: a complete 399-image run takes approximately 14 hours and incurs an estimated API cost of about $29, whereas specialized learned models operate on the order of one second per image. General-purpose generative editors also remain stochastic and can misinterpret shadow structure, motivating the evaluation, filtering, and correction stages. The resulting targets can instead be constructed once and used to train efficient specialized models for deployment. B.4 Additional Qualitative Examples Major-failure retry. Figure 11 shows cases in which the initial probe preserves the shadow as coherent scene content or introduces an object-like interpretation of the masked region. The major-failure evaluator rejects these probes and supplies feedback for retry generation, producing candidates with more complete shadow removal and better scene preservation. InputProbeRetryInputProbeRetry Figure 11: Effect of major-failure retry. The evaluator rejects probes with severe residual shadow structure or object-like hallucination in the masked region. Feedback-guided retry produces cleaner candidates before final selection. Shadow-formation grounding and visual selection. Figure 12 compares generic outputs with physics-motivated candidates. Generic prompting can leave residual shadows, introduce boundary artifacts, or reinterpret dark regions as material or object structure. Shadow-formation grounding produces a stronger candidate pool, and the visual selector chooses the candidate that best balances complete shadow removal with scene, material, and structural consistency. The examples also illustrate why comparing multiple stochastic edits is more reliable than accepting a single output. InputGenericPhysics cand. 1Physics cand. 2Visually selected Figure 12: Effect of shadow-formation grounding and visual candidate selection. Physics-motivated prompting reduces task-level errors and produces stronger candidate edits than generic prompting. All three physics-motivated candidates are shown, with the visually selected output in the final column. Retinex-LoG-supported selection. Figure 13 compares visual-only selection with the final selection supported by Retinex-LoG evidence. Although both candidates may appear plausible, visual assessment alone can favor incomplete shadow removal. By exposing residual, lost, and added local structure after suppressing low-frequency illumination, Retinex-LoG helps the selector achieve more complete removal while preserving the underlying texture. InputVisualFinal InputVisualFinal Figure 13: Effect of Retinex-LoG-supported selection. Red frames indicate candidates selected through visual assessment alone, while green frames indicate the final selections obtained with Retinex-LoG structural evidence. The additional evidence helps reject candidates with residual shadows and select candidates that better preserve scene structure. Segmentation-guided regional correction. Figure 14 shows the input, selected proposal, and regionally corrected output. Candidate selection removes the dominant shadow, but the proposal may retain broad or region-specific brightness and chrominance shifts. We partition the proposal into class-agnostic regions using CropFormer (Qi et al., 2023). For each region, the correction stage estimates offsets from reliable pixels outside the dilated shadow mask, improving local color consistency without reintroducing shadow structure from the input. InputSelectedCorrected InputSelectedCorrected Figure 14: Effect of segmentation-guided regional correction. Selected proposals remove the dominant shadows but can retain spatially varying brightness or color shifts. Regional correction improves agreement with the surrounding scene while preserving image structure. B.5 Failure Cases and Limitations Failure cases. Although the evaluation, selection, and correction stages reduce major construction errors, several failure modes remain. As shown in Figure 15, generative editing can smooth fine texture or remove valid scene detail. Residual shadows beneath vehicles represent a recurring failure mode. Attached shadows may also be only partially removed. Input + maskTarget Input + maskTarget Input + maskTarget Figure 15: Representative construction failures. Each pair shows the mask-overlay input and constructed target. The first example exhibits texture smoothing and loss of valid scene detail. The second illustrates the recurring residual-shadow problem beneath vehicles. The third shows incomplete removal of an attached shadow. Limitations. CDD measures color consistency across the shadow boundary but does not capture changes elsewhere in the image. We therefore additionally measure RGB RMSE between the input and output over non-shadow pixels on the normalized SRR benchmark, using the 0â255 scale. Averaged over two independent runs, the final workflow obtains a mean RMSE of 23.1323.13, compared with 3.443.44â18.3918.39 for the evaluated shadow removal methods (Le and Samaras, 2019; Guo et al., 2023a; Guo et al., 2023b; Li et al., 2023a; Hu et al., 2025). Unlike methods that largely preserve non-shadow pixels, a general-purpose editor regenerates the image and may not remain perfectly aligned with the input at the pixel level. The relatively high RMSE of ShadowDiffusion (18.3918.39) is consistent with this effect. Regional correction reduces the mean non-shadow RMSE of the Retinex-LoG-selected outputs from 25.4825.48 to 23.1323.13, but the remaining gap reflects both pixel-level misalignment and unintended changes outside the target region, including color shifts, texture smoothing, and subtle structural alterations. Appendix C Implementation and Evaluation Details C.1 Baseline Checkpoints and Evaluation Protocol Table 8 records the exact checkpoint and inference settings used for evaluation. We evaluate all 540 ISTD+ and 3,021 AgenticShadow test images, restoring every prediction to its target resolution before computing metrics. PSNR, SSIM, and MAE are computed in RGB space with values in [0,255][0,255]; SSIM is averaged across the three color channels. LAB RMSE is computed after converting the prediction and target from sRGB to LAB. We first average each metric over images within each domain, then compute the AgenticShadow macro average as the unweighted mean of the four domain-level results. ISTD+ is reported separately. Table 8: Checkpoint and inference settings. Combined denotes training with ISTD+ and AgenticShadow, while ISTD+ / INS (Xu et al., 2025a) denotes separate official checkpoints. Outputs are restored to the target resolution before evaluation. Method Checkpoint condition Mask Inference SID (Le and Samaras, 2019) Official ISTD+ Yes Resize to 512Ă512512Ă 512 ShadowFormer (Guo et al., 2023a) Official ISTD+ Yes Resize to 640Ă480640Ă 480 Inpaint4Shadow (Li et al., 2023a) Official ISTD+ Yes Resize to 256Ă256256Ă 256 StableSR (Xu et al., 2025b) Official ISTD+ / INS No Native resolution; 20 steps Padded to a multiple of 16 ShadowDiffusion (Guo et al., 2023b) Official ISTD+ Yes Full 512Ă512512Ă 512 inference 25 DDIM steps Combined E400 HomoFormer (Xiao et al., 2024) Official ISTD+ Yes 384Ă384384Ă 384 tiles 30-pixel overlap Combined E200 PhaSR (Lee et al., 2026) Official ISTD+ / INS No Native resolution Padded to a multiple of 128 Combined E200 C.2 PF and PF-MF Implementation and Training Combined-data training uses the natural concatenation of 1,330 ISTD+ and 14,117 AgenticShadow examples without source reweighting. Image, mask, and target triplets receive the same random 384Ă384384Ă 384 crop and synchronized horizontal-flip and 90â90 -rotation augmentations. The Charbonnier loss (Charbonnier et al., 1994) uses Ï”=10â3Δ=10^-3. The component analysis compares semantic-only, depth-only, and full PF variants after 50 additional epochs from the same HomoFormer E100 checkpoint. The final PF model is initialized from HomoFormer E100, while PF-MF transfers the compatible RGB weights from the same checkpoint. Both models are then trained for 100 epochs; their backbones therefore receive 200 cumulative epochs of combined-data training, while the newly added prior modules are trained for 100 epochs. For the dataset-prior analysis, the PF restoration network is trained from scratch on ISTD+ for 400 epochs following the HomoFormer training regimen, while both prior extractors remain frozen. C.3 Model Complexity and Runtime We measure efficiency on one NVIDIA RTX A6000 at batch size 1 over 40 fixed 512Ă512512Ă 512 test images, ten from each AgenticShadow domain. Each model processes five warm-up images before timing. Mean time per image includes model-specific preprocessing, online prior extraction, tiled inference and stitching where applicable, and output conversion, but excludes model loading and disk I/O. Peak VRAM is the maximum allocated GPU memory during measurement. As shown in Table 9, PF and PF-MF require approximately one second per image. Their larger online parameter counts and memory usage arise primarily from running both frozen prior extractors, while their trainable parameter counts remain close to those of HomoFormer and PhaSR. Table 9: Model complexity and inference efficiency. We compare ShadowDiffusion (Guo et al., 2023b), HomoFormer (Xiao et al., 2024), PhaSR (Lee et al., 2026), PF, and PF-MF. Online parameters include all networks executed during inference. PhaSR uses precomputed geometry, whereas PF and PF-MF execute both frozen prior extractors online. Runtime and peak VRAM are measured on an NVIDIA RTX A6000 during end-to-end processing of 512Ă512512Ă 512 images. Method Online params (M) Trainable params (M) Time/image (s) Peak VRAM (GiB) ShadowDiffusion 55.52 55.52 2.558 1.51 HomoFormer 17.81 17.81 0.505 0.92 PhaSR 323.37 19.00 0.445 2.80 PF 658.93 19.25 0.999 3.33 PF-MF 658.61 18.92 0.978 3.32 Appendix D Additional Results D.1 Full Per-Domain Evaluation Table 10: Full evaluation on the SBU and CUHK-Shadow domains. Official ISTD+ checkpoints are evaluated without adaptation, while â denotes training with ISTD+ and AgenticShadow. Best and second-best results are bolded and underlined, respectively. SBU CUHK-Shadow Method PSNRâ SSIMâ MAEâ LABâ PSNRâ SSIMâ MAEâ LABâ Official ISTD+ checkpoints SID (Le and Samaras, 2019) 20.28 0.6258 18.26 7.25 16.32 0.5643 30.43 10.86 ShadowFormer (Guo et al., 2023a) 21.02 0.6506 16.99 6.63 17.09 0.6008 28.50 10.01 Inpaint4Shadow (Li et al., 2023a) 20.51 0.5883 18.30 7.12 17.54 0.5406 26.43 9.72 StableSR (Xu et al., 2025b) 20.34 0.6345 18.83 7.32 18.38 0.6173 23.94 8.84 ShadowDiffusion (Guo et al., 2023b) 20.75 0.6401 17.73 6.83 17.88 0.6026 25.22 9.09 HomoFormer (Xiao et al., 2024) 20.85 0.6430 17.41 6.78 18.01 0.6085 24.69 9.08 PhaSR (Lee et al., 2026) 20.28 0.6405 18.72 7.32 18.47 0.6240 23.44 8.71 With AgenticShadow supervision ShadowDiffusionâ 21.85 0.6578 16.12 5.84 19.80 0.6618 19.96 7.40 HomoFormerâ 23.61 0.6783 12.79 4.90 21.53 0.6926 15.89 6.23 PhaSRâ 23.66 0.6924 12.92 4.92 21.62 0.7073 15.93 6.19 PF 23.93 0.6888 12.39 4.73 21.80 0.7030 15.38 6.05 PF-MF 23.90 0.6896 12.38 4.75 21.72 0.7039 15.61 6.11 Table 11: Full evaluation on the ASFW and S-EO domains. Official ISTD+ checkpoints are evaluated without adaptation, while â denotes training with ISTD+ and AgenticShadow. Best and second-best results are bolded and underlined, respectively. ASFW S-EO Method PSNRâ SSIMâ MAEâ LABâ PSNRâ SSIMâ MAEâ LABâ Official ISTD+ checkpoints SID (Le and Samaras, 2019) 20.02 0.7687 19.38 7.48 16.50 0.6027 27.02 10.23 ShadowFormer (Guo et al., 2023a) 20.18 0.7801 19.36 7.35 16.01 0.6052 28.57 10.74 Inpaint4Shadow (Li et al., 2023a) 19.90 0.7523 19.88 7.58 16.43 0.5665 27.62 10.08 StableSR (Xu et al., 2025b) 17.14 0.7367 28.16 10.01 15.75 0.6140 29.98 10.93 ShadowDiffusion (Guo et al., 2023b) 20.10 0.7704 19.61 7.47 16.17 0.6119 28.12 10.50 HomoFormer (Xiao et al., 2024) 20.57 0.7789 18.54 7.00 15.95 0.6083 28.77 10.87 PhaSR (Lee et al., 2026) 17.00 0.7454 28.03 10.36 15.87 0.6125 28.82 10.92 With AgenticShadow supervision ShadowDiffusionâ 21.81 0.8030 15.79 5.97 18.40 0.6583 22.46 7.98 HomoFormerâ 23.03 0.8177 13.37 5.33 19.65 0.6839 18.95 7.02 PhaSRâ 23.11 0.8240 14.29 5.31 19.87 0.7000 18.63 6.90 PF 24.33 0.8348 11.59 4.67 19.96 0.6990 18.08 6.76 PF-MF 23.81 0.8298 12.55 4.97 19.99 0.6979 18.14 6.78 Table 10 and Table 11 provide the complete per-domain results underlying the macro averages in the main paper. AgenticShadow supervision improves all four metrics for each retrained architecture in every domain, demonstrating consistent benefits across general, facial, and remote-sensing scenes. PF and PF-MF rank first or second in PSNR, MAE, and LAB RMSE across all four domains, with PF-MF remaining close despite requiring no input mask, while PhaSRâ achieves the highest SSIM on SBU, CUHK-Shadow, and S-EO. D.2 Cross-Dataset and Prior Analysis Table 12: Synthetic-to-real transfer. We compare official ISTD+ and INS (Xu et al., 2025a) checkpoints of StableSR (Xu et al., 2025b) and PhaSR (Lee et al., 2026). AgenticShadow results are four-domain macro averages. ISTD+ AgenticShadow Model Checkpoint PSNRâ SSIMâ MAEâ LABâ PSNRâ SSIMâ MAEâ LABâ StableSR ISTD+ 32.23 0.9272 4.84 2.03 17.90 0.6506 25.23 9.28 INS 22.76 0.8986 12.14 5.82 16.55 0.6350 28.93 11.12 PhaSR ISTD+ 32.12 0.9330 4.82 2.13 17.90 0.6556 24.75 9.33 INS 26.03 0.9129 8.93 4.32 17.24 0.6415 26.90 10.37 Synthetic-to-real transfer. Large-scale synthetic data provide another route to paired supervision: OmniSR (Xu et al., 2025a) introduced INS with over 30,000 rendered shadow and shadow-free image pairs spanning diverse objects and direct and indirect illumination. We therefore evaluate official INS checkpoints of StableSR and PhaSR to test whether this scale transfers to real imagery. As shown in Table 12, both INS checkpoints underperform their ISTD+ counterparts across all metrics on ISTD+ and AgenticShadow, revealing a persistent synthetic-to-real gap and underscoring the importance of large-scale supervision constructed from diverse real-world images. Table 13: Effect of HomoFormer training data. The AgenticShadow and Combined conditions are initialized from the official ISTD+ checkpoint; Combined denotes training with ISTD+ and AgenticShadow. AgenticShadow results are four-domain macro averages. ISTD+ AgenticShadow Training data PSNRâ LABâ PSNRâ SSIMâ MAEâ LABâ ISTD+ 32.53 1.92 18.85 0.6597 22.36 8.43 AgenticShadow 27.96 2.74 21.85 0.7152 15.45 5.94 Combined 32.92 1.85 21.95 0.7181 15.25 5.87 Complementary paired supervision. Table 13 examines how controlled and constructed pairs complement one another. Training with only AgenticShadow after ISTD+ initialization reduces macro LAB RMSE from 8.43 to 5.94 but increases ISTD+ LAB RMSE from 1.92 to 2.74, indicating that controlled captures remain a useful anchor for photometric fidelity. Combined training performs best on both evaluations, showing that AgenticShadow adds substantial real-world diversity while controlled pairs help preserve precise restoration behavior. Prior components. Table 14 shows that semantic and depth priors independently improve every AgenticShadow domain, with semantic information providing the larger gain. Combining both priors performs best on all four domains and the macro average, while ISTD+ performance remains nearly unchanged across the matched variants. This indicates that prior fusion is most beneficial under the broader scene and shadow diversity of AgenticShadow. Table 14: Per-domain PF component analysis. All values are LAB RMSE. Each variant is initialized from HomoFormer E100 and trained for 50 additional epochs; Macro is the unweighted average of the four AgenticShadow domains. Variant ISTD+ SBU CUHK ASFW S-EO Macro HomoFormer 1.860 4.907 6.266 5.434 7.041 5.912 Depth only 1.859 4.835 6.155 5.122 6.964 5.769 Semantic only 1.857 4.731 6.051 4.750 6.807 5.585 PF 1.861 4.723 6.045 4.737 6.804 5.577 D.3 Qualitative Results and Videos Videos. We additionally evaluate video sequences, comparing PF with pretrained HomoFormer (Xiao et al., 2024) on ViSha (Chen et al., 2021) using the provided masks, and PF-MF with SP+M+I-Net (Le and Samaras, 2022) on SBU-TimeLapse without input masks. All methods are applied independently to individual frames without temporal modeling. Although our baselines are not optimized for sequential data, PF and PF-MF produce cleaner and more complete shadow removal than the compared methods across the videos. Additional qualitative comparisons. We provide three complementary comparisons: (1) Figure 16 completes qualitative coverage of the official ISTD+ checkpoints; (2) Figure 17 compares ISTD+ and INS checkpoints to illustrate the synthetic-to-real generalization gap; and (3) Figure 18 contrasts ISTD+-pretrained models with their AgenticShadow-trained counterparts and PF-MF, demonstrating the benefit of broader paired supervision and the effectiveness of the mask-free variant. Input SID ShadowFormer Inpaint4Shadow ShadowDiffusion PF Target Figure 16: Qualitative comparison with official ISTD+ checkpoints. We compare SID (Le and Samaras, 2019), ShadowFormer (Guo et al., 2023a), Inpaint4Shadow (Li et al., 2023a), and ShadowDiffusion (Guo et al., 2023b) with PF across the four AgenticShadow domains. The official checkpoints frequently leave residual shadows or introduce color shifts, whereas PF produces more complete removal and outputs closer to the constructed targets. Input StableSR-ISTD+ StableSR-INS PhaSR-ISTD+ PhaSR-INS PF Target Figure 17: Qualitative comparison of ISTD+ and INS checkpoints. We compare the official ISTD+ and synthetic INS (Xu et al., 2025a) checkpoints of StableSR (Xu et al., 2025b) and PhaSR (Lee et al., 2026) with PF. The INS-trained models continue to exhibit residual shadows and appearance shifts on real-world AgenticShadow scenes, illustrating that large-scale synthetic supervision does not eliminate the synthetic-to-real gap. Input HomoFormer HomoFormerâ PhaSR PhaSRâ PF-MF Target Figure 18: Additional qualitative comparison of AgenticShadow supervision. We compare the official ISTD+ checkpoints of HomoFormer (Xiao et al., 2024) and PhaSR (Lee et al., 2026), their counterparts trained with ISTD+ and AgenticShadow (â ), and PF-MF. AgenticShadow supervision produces cleaner and more complete shadow removal, while PF-MF achieves strong results without input masks. Colored insets show mean absolute RGB error using a shared scale.