Hybrid GAN-contrastive learning for anatomically faithful X-ray generation
This project presents a hybrid GAN–contrastive learning system designed to generate highly realistic medical X-ray images under two different data availability settings: Paired Setting where each input image has a corresponding ground-truth target image, and Unpaired Setting where the source and target image domains are fully independent with no shared alignment. The overarching goal of this work is to create a robust, domain-aware, anatomy-preserving generative model that can reconstruct missing or corrupted regions in medical scans, translate images between different clinical acquisition domains, improve dataset consistency for downstream diagnostic models, and generate synthetic, anatomically faithful data for augmentation. The hybrid approach combines adversarial learning (GAN) for realism, contrastive PatchNCE loss for maintaining local structural identity, feature matching and perceptual losses for stability, and custom generators and discriminators tailored for medical imaging. This allows the model to generalize beyond pixel alignment, producing clinically meaningful synthetic data even when paired samples are unavailable.
Python, PyTorch, CUDA, OpenCV, NumPy, Pillow, Matplotlib, Seaborn, TensorBoard, Visdom, Custom GAN Modules, PatchNCE Loss Implementation, PatchGAN Discriminator, U-Net Generator, Mixed Precision Training (AMP), DistributedDataParallel