This project explores Image Translation and Unsupervised Domain Adaptation (UDA) to improve deep learning models' adaptability across datasets. It utilizes a CycleGAN for domain adaptation between the MNIST and USPS datasets, enabling effective classification without labeled target data.
-
Dataset Preprocessing:
- Resize images to 28×28.
- Convert to greyscale.
- Normalize pixel values to mean=0.5, std=0.5.
-
Convolutional Neural Network (CNN):
- Baseline image classification on MNIST.
- Achieved 68% accuracy on USPS dataset without UDA.
-
CycleGAN:
- Translates images from MNIST (source) to USPS (target) domains.
- Uses generators, residual blocks, and discriminators for image-to-image translation.
- Enables training without paired datasets.
-
UDA Integration:
- Applies CycleGAN-generated dataset for target domain training.
- Improves USPS classification accuracy to 90% without labeled USPS data.
- Resize: 28×28 pixels.
- Convert: Greyscale to simplify inputs.
- Normalize: Mean and standard deviation to 0.5 for improved model performance.
- Two convolutional layers (ReLU activation, max pooling).
- Fully connected layer with ten outputs.
- Trained for 10 epochs on MNIST; tested on USPS.
- Generator: Translates between domains using convolutions and residual blocks.
- Discriminator: Differentiates real vs. translated images using adversarial training.
- Cycle Consistency: Ensures original image reconstruction after domain translations.
- Train CycleGAN with MNIST as source and USPS as target.
- Generate USPS-like dataset from MNIST.
- Train CNN on the CycleGAN-translated dataset.
- Evaluate CNN on USPS dataset.
- Addresses vanishing gradient issues.
- Two convolutional layers with ReLU and batch normalization.
- Enables learning from input-output differences.
- Four-layer CNN with leaky ReLU activation.
- Outputs likelihood of real vs. generated images.
- Encodes, processes through residual blocks, and decodes input.
- Uses Tanh activation to normalize pixel values.
- Forward pass: Translate source to target domain and back.
- Cycle consistency loss ensures meaningful translations.
- Adversarial training improves generator realism.
- Achieved 90% USPS classification accuracy using UDA.
- Demonstrated effective domain adaptation with CycleGAN.
- Shape Consistency: Source and target datasets must share similar shapes (e.g., digits in MNIST and USPS).
- Dataset Specificity: Each new dataset requires CycleGAN retraining, limiting scalability.
- Potential Translation Errors: Domain translations may introduce minor inaccuracies.
- Automate domain alignment for datasets with greater variability (e.g., rotation, skew).
- Enhance generalization across multiple datasets simultaneously.
- Optimize computational efficiency of CycleGAN training.