This repository contains the implementation of OASIS (Only Adversarial Segmentation-to-Image Synthesis) and GauGAN (SPADE) for generating realistic dental panoramic X-ray images from semantic segmentation masks.
- Semantic-to-Image Synthesis: Generate high-fidelity dental X-rays from multi-class labels.
- Dual Model Support: Implements both OASIS and GauGAN architectures.
- Medical Imaging Focus: Specifically tuned for the TUFTS Dental Database and dental panoramic image characteristics.
- Evaluation Suite: Includes metrics such as SSIM, FID, and clinical validation tools.
- Interactive App: A Streamlit-based application for real-time inference and testing.
-
Clone the repository:
git clone https://github.com/SerdarHelli/SemanticImageSynthesisDentalPanoramic.git cd SemanticImageSynthesisDentalPanoramic -
Install dependencies:
pip install -r requirements.txt
To train the model, use the train.py script. You need to provide the paths to the training and validation data.
python train.py --train_data_path /path/to/train --val_data_path /path/to/val --model oasis --epochs 50 --batch_size 1--model: Choose betweenoasisorgaugan.--img_size: Input image size (default 256).--include_abnormality: Boolean to include or exclude abnormality classes (default True).--logs_path: Directory to save checkpoints and TensorBoard logs.
Run the evaluation script to calculate metrics on your test set:
python eval.py --test_data_path /path/to/test --model_path /path/to/checkpointLaunch the interactive Streamlit app for testing:
streamlit run app/fisher_test_app.py- OASIS: A segmentation-to-image synthesis model that uses a discriminator trained to perform semantic segmentation, eliminating the need for a separate perceptual loss in some configurations.
- GauGAN (SPADE): Utilizes Spatially-Adaptive Normalization to better preserve semantic information throughout the generator.
semantic-image-synthesis, dental-panoramic, gan, oasis-gan, gaugan, spade, tensorflow, keras, medical-imaging, deep-learning, image-generation, tufts-dental-database, x-ray-synthesis, computer-vision
This project is licensed under the MIT License - see the LICENSE file for details.
