IEEE TPAMI 2026First author

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.

Jhon Lopez1   Edwin Vargas2   Junzhe Wang2   Salman S. Khan2   Henry Arguello1   Ashok Veeraraghavan2

¹ Universidad Industrial de Santander² Rice University

Overview

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.

DepthShield framework: a camera with a phase mask produces depth-dependent PSFs; tampered images are detected both on the encoded capture and after enhancement
Fig. 1Left: the co-designed camera embeds texture–depth cues at capture. Middle: verified images are enhanced, and edits made after enhancement still break texture–depth consistency. Right: diffusion edits at different scales are detected by the verification module.
Interactive demo

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.

1/5

Attacker edits

①Real scenedrag the objects
②Encoded captureblurred by the phase mask (~20 dB)
③Depth read from the blurdark = near · bright = far
④Detected editsauthentic

Attack the photo

Balloons can be dragged around photo ②.

Camera optics

nearfar
Simulated PSFsimulated
Measured PSF of the prototypemeasured

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.

Method

Two stages: secure capture, then high-quality release

IC-Stage: camera with phase mask, manipulation, depth network and forgery network. IR-Stage: restoration network, manipulation, depth network and forgery network
Fig. 2IC-Stage (top): the encoded capture is checked by estimating depth and looking for inconsistencies. IR-Stage (bottom): a restoration network uses the capture and its depth to produce a clean image that still carries the depth cues, so the same detector works after enhancement.
01

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.

02

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.

03

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.

Results

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.

0.98F1 on Stable Diffusion inpainting (IR-Stage, clean)
0.95F1 on the same edits with JPEG or noise (IC-Stage)
0.53 → 0.12LPIPS from encoded to restored image
0.95+F1 rejecting images forged by reverse-engineering attacks
Qualitative comparison of tamper masks from MVSS-Net, PSCC-Net, IML-ViT, EditGuard and DepthShield, with DepthShield depth maps
Fig. 3Diffusion edits. Passive detectors miss most of the edited region; EditGuard leaks its watermark pattern. DepthShield's mask follows the edit, and its depth map shows why: the edited region has no consistent depth.
MethodStable DiffusionControlNetLaMa
CleanDegradedCleanDegradedCleanDegraded
MVSS-Net0.3310.2310.3800.2570.4190.268
TruFor0.2180.1170.3400.2900.5250.204
EditGuard0.9140.7840.9140.7860.9040.787
DepthShield-IC0.9710.9550.9810.9580.9780.946
DepthShield-IR0.9810.9250.9750.9040.9580.885

F1 for tamper localization on diffusion-based edits (higher is better). Full table with AUC, IoU and more baselines in the paper.

MethodCopy–moveSplicing
CleanDegradedCleanDegraded
MVSS-Net0.6300.4730.9030.632
TruFor0.7570.4800.9180.798
EditGuard (same key)0.9310.5860.0010.080
DepthShield-IC0.8840.7500.8990.776
DepthShield-IR0.9640.8650.9650.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.

Prototype

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.

Lens with the fabricated phase mask and its height map, and simulated versus acquired PSFs from near to far
Fig. 4The fabricated phase mask in the lens (left) and its 10 depth-dependent PSFs, simulated (top) and measured on the prototype (bottom).
Real captures from the prototype, tampered versions and predicted masks in the IC and IR stages
Fig. 5Real captures from the prototype, their edited versions and the predicted masks, before (IC-Stage) and after (IR-Stage) restoration.
Cite

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}
}