Skip to content

Repository files navigation

Generative AI — Assignment #01

A collection of three deep-learning projects exploring sequence-to-sequence translation, denoising autoencoders, and variational autoencoders.

# Topic Dataset Key Technique
Q1 Neural Machine Translation English–Urdu parallel corpus Vanilla RNN Seq2Seq
Q2 Denoising Autoencoder (see notebook) Convolutional Autoencoder
Q3 Variational Autoencoder Fashion-MNIST VAE with latent-dim study

Repository Structure

Assignment#01/
├── README.md                        ← you are here
├── .gitignore
│
├── Q1-Neural-Machine-Translation/
│   ├── README.md
│   ├── notebook.ipynb               ← full experiment notebook
│   ├── report.tex                   ← LNCS LaTeX report source
│   ├── references.bib
│   ├── Q1_Report.pdf                ← compiled report
│   ├── figures/                     ← plots used in the report
│   └── models/                      ← saved model checkpoints
│
├── Q2-Denoising-Autoencoder/
│   ├── README.md
│   ├── notebook.ipynb               ← full experiment notebook
│   ├── Q2_Report.pdf                ← compiled report
│   └── prompts.txt
│
└── Q3-Variational-Autoencoder/
    ├── README.md
    ├── notebook.ipynb               ← full experiment notebook  (run on Kaggle GPU)
    ├── report.tex                   ← LNCS LaTeX report source
    ├── references.bib
    └── figures/                     ← save notebook plots here after execution

Q1: CycleGAN for Person Face Sketches

This directory contains the Kaggle face-sketches translation implementation using PyTorch logic. The complete implementation, along with the required Flask simple user interface is in notebook.ipynb.

Instructions

  1. Download this notebook or open it in Google Colab.
  2. Upload your kaggle.json key or provide it when the cell asks, so it can automatically download the almightyj/person-face-sketches dataset.
  3. Run all cells to train the CycleGAN.
  4. During testing and UI step, it will generate a Flask app.py and run it via ngrok so you can use the Flask UI from your Colab notebook live!

Q2: English-to-Urdu Machine Translation (Transformer)

This directory contains the standard "Attention is All You Need" implementation translated to English-to-Urdu translation pairs. The complete implementation is in notebook.ipynb, relying on the parallel Kaggle corpus.

Instructions

  1. Download this notebook or open it in Google Colab.
  2. Upload your kaggle.json key or provide it when the cell asks, so it can automatically download the zainuddin123/parallel-corpus-for-english-urdu-language corpus.
  3. Run all cells to process BPE tokenizers and train the model.
  4. It outputs your BLEU metrics using the sacrebleu library.

Q3: Vision Transformer vs CNN on CIFAR-10

This directory contains three distinct model comparisons on CIFAR-10:

  1. Custom CNN
  2. Scratch Vision Transformer
  3. Pretrained Vision Transformer (ViT) via HuggingFace timm.

Instructions

  1. Download this notebook or open it in Google Colab.
  2. Run the cells as normal. CIFAR-10 automatically downloads through torchvision.datasets.
  3. Training loops emit visualizations, Loss/Acc curves, which should be saved into figures/ recursively.

How to Reproduce

  1. Clone the repository.
  2. Open the desired notebook.ipynb in Kaggle (GPU recommended) or Jupyter.
  3. Run All cells — each notebook is self-contained and downloads its own data.
  4. Figures are saved / displayed inline; copy them to the figures/ folder if you want to compile the LaTeX report.

Requirements

  • Python ≥ 3.9
  • PyTorch ≥ 1.12
  • torchvision, matplotlib, seaborn, pandas, scikit-learn, numpy

All dependencies are pre-installed on Kaggle.

Author

Muhammad Tahir
Generative AI Course — Spring 2026

License

This repository is for educational purposes only.

About

A collection of deep learning and Generative AI projects covering Neural Machine Translation, Autoencoders, Variational Autoencoders, CycleGANs, and Vision Transformers using PyTorch. This repository includes complete implementations, experiment notebooks, reports, and model comparisons across NLP and Computer Vision tasks.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages