cs.CVNov 11, 2026

Learning-Based Interpolation of Detector Gaps in Photon-Counting X-ray Imaging

Authors: Johannes B. Thalhammer, Patrick Ilg, Tina Dorosti, Sebastian Peterhansl, Theresa Hiu, Daniel Frey, Zijin Huang, Florian Schaff, 

Organizations: Chair of Biomedical Physics, Department of Physics, School of Natural Sciences, Technical University of Munich (TUM), Germany · Munich Institute of Biomedical Engineering, TUM, Germany · Department of Diagnostic and Interventional Radiology, School of Medicine and Health, Klinikum rechts der Isar, TUM, Germany

Abstract

Image detectors assembled from tiled modules have physical gaps in the field of view that must be filled before downstream processing such as phase retrieval or tomographic reconstruction. Unlike natural-image inpainting, detector-gap interpolation must leave all other pixels unmodified and preserve the intensity statistics of the filled region, since even a small shift in mean intensity can cause ring artifacts after reconstruction. We adapted two generative models, a Wasserstein GAN with gradient penalty (WGAN-GP) and a conditional Pix2Pix model, to this task. We implemented a masking strategy that restricts all changes to the gap pixels and loss terms that constrain the mean intensity and the intensity distribution of the filled region. Both models were trained on nanoCT projections with simulated gaps and compared with linear interpolation, Navier--Stokes inpainting, and the deep image-inpainting network MADF, quantitatively on simulated gaps and visually on real detector gaps. WGAN-GP and Pix2Pix achieved the best perceptual similarity (LPIPS) and histogram distance and, apart from linear interpolation, the shortest inference time. Pix2Pix required about five times fewer training GPU-hours than WGAN-GP. Ablation studies showed that masking the network output contributes by far the most to plausible inpainting results. Applied to sinograms, Pix2Pix produced the most natural gap filling but improved the reconstruction only slightly compared with linear interpolation. The source code and the weights of the final Pix2Pix model are available at https://github.com/J-3TO/detectorGapRemoval_Pix2Pix.

Figures & tables

Explore similar work

Jan 30, 2026

AI-Generated Image Detectors Exploit Global Artifacts: Evidence from Inpainting Exchange

Modern diffusion-based inpainting enables realistic, localized image manipulation, raising critical challenges for reliable detection. We show that state-of-the-art AI-generated image detectors largely fail to identify what was synthesized and instead exploit a global artifact introduced as a side effect of the generation pipeline: latent-diffusion inpainting passes the entire image through a VAE encoder--decoder, inducing a subtle but pervasive spectral shift even in unedited regions. We turn this observation into a simple, model-free diagnostic, Inpainting Exchange (INP-X), that restores the original pixels outside the edited region while preserving all synthesized content. To study the effect at scale, we build a benchmark of 3030K matched real, standard-inpainted, and exchanged triplets (9090K images) spanning four datasets and three inpainters. INP-X requires no model access and is a single compositing step, yet it collapses pretrained detectors, commercial APIs, and bias-aware methods toward chance (commercial APIs: >$$90\%\!\to\!\sim$$55\%; the bias-aware DDA: 97.6% ⁣→ ⁣58.4%97.6\%\!\to\!58.4\%). We give formal propositions linking the effect to high-frequency attenuation from the VAE information bottleneck, and we causally isolate it with a factorial battery and a variance decomposition that attributes 97%97\% of the background spectral shift to the autoencoder round-trip alone. A perceptual study (n=153n{=}153) shows the shift is also perceptible to humans, whose accuracy falls from 63.8%63.8\% to 56.2%56.2\% (p=0.002p{=}0.002): significantly reduced, though not eliminated. Finally, we show that mechanism-driven mitigations (mixed-distribution and localization-supervised training) improve robustness, but detecting INP-X edits remains an open problem. Our benchmark and code are available at: https://github.com/emirhanbilgic/INP-X
Jul 27, 2026

Image Inpainting via Stochastic Dynamics

Image inpainting aims to recover missing regions while preserving structural consistency. We propose a non-parametric method without network training based on data-guided stochastic dynamics. Starting from a masked image, the missing pixels are evolved through a reverse-time stochastic differential equation with a kernel-weighted correction estimated directly from a reference dataset. This empirical correction guides the reconstruction toward high-density regions of the data distribution without training a neural network or fitting a parametric density model. Experiments on MNIST, Fashion-MNIST, and MVTec show that the proposed method outperforms Mean Fill, Telea, and Navier-Stokes inpainting in PSNR, SSIM, and visual quality. On CelebA, it remains competitive and produces plausible completions for structure-sensitive occlusions. These results demonstrate the effectiveness of empirical reference statistics as a non-parametric prior for image inpainting.
Nov 3, 2026

LIPS-PC: Learning Illumination Patterns for Single-Pixel Classification

In single-pixel (ghost) imaging, known illumination patterns probe an object and a detector with no spatial resolution returns one number per pattern. Each measurement costs acquisition time and photons and, for ionizing probes, contributes to delivered dose. Motivated by automated radiographic defect screening, where a class label suffices, we introduce Learning Illumination Patterns for Single-Pixel Classification (LIPS-PC). The patterns are learned end-to-end while the measurement operator remains one fixed linear matrix, identical for every input. We parameterize it as a residual correction to a two-dimensional discrete cosine transform (2D-DCT), D=Dbase+ΔD=D_{\mathrm{base}}+Δ, and jointly train the correction and a compact classifier using cross-entropy, without a reconstruction objective. This yields a task-driven linear embedding through optimization. We evaluate LIPS-PC numerically on MNIST and Fashion-MNIST under a controlled protocol, then on RIAWELC, a real industrial X-ray weld-radiograph dataset. Across five budgets, M∈8,16,32,64,128M\in{8,16,32,64,128}, corresponding to sampling ratios from below 1% to 12.5%, the learned operator outperforms the best tested fixed transform by 9-15 percentage points at M=8M=8 on all three datasets. Its eight-measurement accuracy requires roughly 16-32 measurements with the best fixed transform, indicating a 2×2\times to 4×4\times saving at comparable accuracy. The advantage generally shrinks as MM increases, with a small reversal on RIAWELC at higher budgets. These results show that learning what to measure is especially valuable when measurements are scarce.