[Paper Review] Chest X-ray Inpainting with Deep Generative Models
This paper proposes using three deep generative models—context encoders, semantic image inpainting, and contextual attention—for realistic inpainting of missing regions in chest X-rays. Trained on 1.2 million normal patches, the models generate high-fidelity reconstructions that highlight abnormalities when subtracted from original images, with human observers failing to detect inpainted regions over 50% of the time, especially with the contextual attention model.
Generative adversarial networks have been successfully applied to inpainting in natural images. However, the current state-of-the-art models have not yet been widely adopted in the medical imaging domain. In this paper, we investigate the performance of three recently published deep learning based inpainting models: context encoders, semantic image inpainting, and the contextual attention model, applied to chest x-rays, as the chest exam is the most commonly performed radiological procedure. We train these generative models on 1.2M 128 $ imes$ 128 patches from 60K healthy x-rays, and learn to predict the center 64 $ imes$ 64 region in each patch. We test the models on both the healthy and abnormal radiographs. We evaluate the results by visual inspection and comparing the PSNR scores. The outputs of the models are in most cases highly realistic. We show that the methods have potential to enhance and detect abnormalities. In addition, we perform a 2AFC observer study and show that an experienced human observer performs poorly in detecting inpainted regions, particularly those generated by the contextual attention model.
Motivation & Objective
- To investigate the feasibility of applying state-of-the-art deep generative models to medical image inpainting in chest X-rays.
- To assess whether generative models trained only on normal images can produce realistic patches that reveal abnormalities when subtracted from original images.
- To evaluate the visual quality and detectability of inpainted regions by human experts using a 2AFC observer study.
- To determine if inpainting can enhance subtle abnormalities in chest radiographs through reconstruction-based anomaly detection.
- To establish a foundation for using unsupervised generative models in medical imaging without requiring annotated abnormal data.
Proposed method
- Trained three deep generative models—context encoders, semantic image inpainting, and contextual attention—on 1.2 million 128×128 patches extracted from 60,000 healthy chest X-rays.
- Each model was trained to predict the central 64×64 region of a patch given the surrounding context, using adversarial training to improve realism.
- Evaluated performance using PSNR on both healthy and abnormal test patches to quantify reconstruction quality.
- Performed pixel-level subtraction between original and generated patches to highlight discrepancies, which correspond to potential abnormalities.
- Conducted a 2AFC observer study with an experienced radiologist to assess human detectability of inpainted regions across the three models.
- Used a large-scale dataset of normal X-rays to pre-train models, enabling zero-shot inference on both normal and abnormal studies without fine-tuning.
Experimental results
Research questions
- RQ1Can modern deep generative models produce realistic and contextually consistent inpaintings in chest X-rays using only normal training data?
- RQ2How do different generative architectures (context encoders, semantic inpainting, contextual attention) compare in terms of reconstruction quality and realism on medical images?
- RQ3To what extent can inpainted regions reveal abnormalities when subtracted from original images, suggesting potential for anomaly detection?
- RQ4How difficult is it for an expert radiologist to distinguish between real and inpainted chest X-ray patches, and which model produces the most realistic results?
- RQ5Can generative inpainting be used as a tool to enhance subtle or masked abnormalities in clinical imaging without requiring abnormal training data?
Key findings
- The contextual attention model achieved the highest visual realism, with human observers correctly identifying the real image in only 37.03% of 2AFC trials, indicating strong indistinguishability from real patches.
- The semantic inpainting model achieved the highest PSNR on healthy patches (30.18 ± 3.28), indicating superior reconstruction fidelity on normal anatomy.
- On abnormal patches, PSNR dropped significantly across all models, with the contextual attention model achieving 26.79 ± 3.47, suggesting that abnormalities are more challenging to reconstruct faithfully.
- Pixel-wise subtraction between original and generated patches produced white noise for normal regions, while highlighting abnormal structures such as nodules, demonstrating the method’s potential for anomaly detection.
- The observer study confirmed that the contextual attention model’s outputs were most difficult to detect, with accuracy below chance level (50%) in 37.03% of trials, indicating high realism.
- The results demonstrate that generative inpainting with only normal data can produce clinically plausible reconstructions and reveal abnormalities through residual analysis, supporting its use in unsupervised anomaly detection.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.