Skip to content

Validation

image

Image-level metrics: photometric error, SSIM, LPIPS, color error, noise statistics.

Status: not implemented (Phase 4).

geometry

Geometric validation: reprojection / distortion residuals against real captures.

Status: not implemented (Phase 4).

optics

Optical validation: compare the runtime renderer against the DeepLens reference.

Phase 1 exit check: renderer.render(rgb, depth) must agree with the physical reference, and be fast. Real-camera PSF/MTF comparison comes with measured data (Phase 3/4).

timed

timed(fn, *args, repeats: int = 5, warmup: int = 1, **kwargs) -> tuple[Any, list[float]]

Run fn and return (result, wall-clock seconds per repeat), CUDA-synchronized.

compare_to_reference

compare_to_reference(renderer, reference, rgb: Tensor, depth: Tensor, psf_grid=None) -> dict

Render with the runtime renderer and the DeepLens reference and compare.

reference is a DeepLensOptics. The reference uses the renderer bank's depth layers and far plane, so only the rendering method differs.

point_response_check

point_response_check(renderer, reference, pixels, depths_m, channel: int = 1) -> list[dict]

Compare rendered point-source responses with PSFs traced directly by DeepLens.

For each pixel (row, col) and depth, a single bright pixel on black is rendered through renderer, which interpolates the bank in field and depth. The ks x ks crop around it is compared with reference.generate_psf at that exact field position and depth. This measures PSF-bank interpolation error against physics.

Returns per case: l1 = sum |rendered - traced| (0 = identical, 2 = disjoint), l1_mc_floor = the same between two independent traces, l1_nearest = the nearest bank PSF (node and layer) vs traced, and peak_ratio = rendered peak / traced peak.