GANs
ABSTRACT
Suffering from challenges in acquiring and dealing with real medical data (anonymization, classification, enrichment), research so far has had to resort to easy synthetic images that are not clinically realistic. Recent advances in GANs now make it possible to generate high-quality synthetic medical images that closely mimic originals and whose characteristics can be adjusted to experimental needs. This project leverages these networks to synthesize such images, opening up new possibilities in image analysis, radiologist training, surgical planning, and overall enhancement of medical visualization and decision-making. .
Project Overview
This project examines generative adversarial networks (GANs) for producing medical images from DICOM data sets. We evaluate the StyleGAN3 and DCGAN structures for producing bone X-ray images based on image quality and clinical significance.
Architecture Comparison (256×256 Implementation)
Feature | StyleGAN3 | DCGAN | Medical Imaging Implications |
---|---|---|---|
Image_size | Native 256×256 implementation | Modified architecture for 256×256 | Both configured for clinical PACS-compatible resolution |
Batch Size | 16 | 64 | DCGAN allows larger batches at same resolution |
Convergence Time | 6h | 48min | DCGAN reaches usable results 2.5× faster |
Memory Footprint | 18GB VRAM | 6GB VRAM | DCGAN more accessible for clinical hardware |
Output Quality | FID 12.3 | FID 28.7 | StyleGAN produces more diagnostically useful 256px images |
DCGAN Training Progression(64px by Epochs)




Key Observations:
- At 50 epochs: Basic structures emerge but lack detail (blurry)
- 100 epochs: Bone structures become visible but still noisy
- 150 epochs: Significant improvement in anatomical details
- 200 epochs: Best results - clear bone structures with minimal artifacts
High-Resolution DCGAN Progression (256px by Epochs)




Key Observations:
- 850 epochs: Beginning of high-resolution feature development
- 900 epochs: Improved texture and finer details visible
- 950 epochs: Sharpness increases with more defined structures
- 1000 epochs: Optimal balance between detail and artifact reduction
StyleGAN3 Training Progression (256px by kimg)




Key Observations:
- 10 kimg: Basic shapes appear but lack coherence
- 40 kimg: Anatomical structures start forming with style variations
- 80 kimg: High-quality details emerge with realistic textures
- 100 kimg: Professional-quality images with fine details
Code & Resources
Notebook Features:
- Process DICOM images from multiple folders
- Resize and normalize to 256x256 pixels
- Convert and save as JPG format
- Batch processing capabilities
Overview Video
GAN Results Comparison
Performance Metrics Comparison
About the Metrics:
-
SSIM (Structural Similarity Index Measure): Quantifies loss of image quality (ideal match = 1). StyleGAN3 (0.85) preserves structures better than DCGAN (0.72).
- FID (Fréchet Inception Distance): Lower = better quality. StyleGAN3 (12.3) better than DCGAN (25.6).
- PSNR (Peak Signal-to-Noise Ratio): Higher = better quality. StyleGAN3 (28.4dB) compared to DCGAN (24.1dB).
- Training Time (hours): DCGAN trains faster (40 min)(1000 epoch) but of lower quality than StyleGAN3 (6h)100kimg