DepthShield: Optical Depth Encoding for Image Tampering Detection
The camera writes scene depth into every photo it takes. An edit that does not respect that depth gives itself away.
¹ Universidad Industrial de Santander² Rice University
Authenticity from the moment of capture
Diffusion inpainting and careful manual edits now keep the statistics of natural images, so detectors that only look at pixels after the fact keep losing ground. DepthShield moves the protection into the camera. A learned phase mask makes the blur of every point depend on its depth, which ties what the image looks like to the 3D geometry of the scene. An authentic photo respects that tie. An edit breaks it, and we can tell where.
Try to fool the camera
Every photo from this camera carries a depth signature in its blur. Edit the photo and the signature breaks. The capture is checked first: if it was edited, it is rejected and never enhanced. If it is authentic, it is enhanced for sharing or other vision tasks, and the enhanced image can still be authenticated through depth. Watch the short walkthrough, then attack either one yourself.
Attacker edits
Attack the photo
Balloons can be dragged around photo ②.
Camera optics
A simplified version that runs in your browser. The blur uses the 10 depth-dependent PSFs of the learned phase mask from the paper. The attacker does not know them, so pasted content gets a generic blur and erased regions are filled with a plausible background. Reading depth and finding edits are idealized here; in DepthShield they are learned networks trained end-to-end with the optics.
Two stages: secure capture, then high-quality release
Optical encoding
A phase mask in the aperture, parameterized with Zernike polynomials, gives each depth its own PSF. The capture is a layered convolution of the scene with those PSFs, a fixed mapping between geometry and image.
Depth-based verification
A network estimates depth from the encoded image and a second one localizes regions where that depth is inconsistent. Diffusion edits, splicing and copy-move look plausible but break the geometry the optics wrote in.
Integrity restoration
The encoded image favors security (~20 dB). A depth-aware restoration network brings it to ~30 dB while a depth-consistency loss keeps the cues that verification needs.
Ahead of passive and proactive detectors
Trained on COCO with Stable Diffusion inpainting as the forgery model, and tested on 1,770 COCO validation images edited with three different tools, plus splicing and copy-move from CASIA v2.0. "Degraded" adds random JPEG compression or Gaussian noise.
| Method | Stable Diffusion | ControlNet | LaMa | |||
|---|---|---|---|---|---|---|
| Clean | Degraded | Clean | Degraded | Clean | Degraded | |
| MVSS-Net | 0.331 | 0.231 | 0.380 | 0.257 | 0.419 | 0.268 |
| TruFor | 0.218 | 0.117 | 0.340 | 0.290 | 0.525 | 0.204 |
| EditGuard | 0.914 | 0.784 | 0.914 | 0.786 | 0.904 | 0.787 |
| DepthShield-IC | 0.971 | 0.955 | 0.981 | 0.958 | 0.978 | 0.946 |
| DepthShield-IR | 0.981 | 0.925 | 0.975 | 0.904 | 0.958 | 0.885 |
F1 for tamper localization on diffusion-based edits (higher is better). Full table with AUC, IoU and more baselines in the paper.
| Method | Copy–move | Splicing | ||
|---|---|---|---|---|
| Clean | Degraded | Clean | Degraded | |
| MVSS-Net | 0.630 | 0.473 | 0.903 | 0.632 |
| TruFor | 0.757 | 0.480 | 0.918 | 0.798 |
| EditGuard (same key) | 0.931 | 0.586 | 0.001 | 0.080 |
| DepthShield-IC | 0.884 | 0.750 | 0.899 | 0.776 |
| DepthShield-IR | 0.964 | 0.865 | 0.965 | 0.871 |
F1 on classical, non-AI edits from CASIA v2.0, made on already protected images. A copied region keeps EditGuard's watermark and passes as authentic; it does not keep a consistent depth.
A real camera, a fabricated mask
We fabricated the learned mask by two-photon lithography (Nanoscribe Photonic Professional GT, fused silica) and placed it near the pupil of a Canon EOS 5D Mark IV with a 50 mm f/1.8 lens. PSFs measured with a 30 µm pinhole match the simulated ones, and after fine-tuning on the real optics the pipeline localizes edits on real captures.
BibTeX
@article{Lopez_2026_DepthShield,
author = {Lopez, Jhon and Vargas, Edwin and Wang, Junzhe and Khan, Salman Siddique and Arguello, Henry and Veeraraghavan, Ashok},
title = {DepthShield: Optical Depth Encoding for Image Tampering Detection},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
year = {2026},
pages = {1--12},
doi = {10.1109/TPAMI.2026.3750903},
note = {Early Access}
}