# debopriya-ai/celebgan architecture

> Architecture diagram of the GitHub repository debopriya-ai/celebgan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/debopriya-ai/celebgan
- Repository: https://github.com/debopriya-ai/celebgan

## Overview

##### Project type and purpose
- This is a deep-learning prototype—specifically a custom Generative Adversarial Network (GAN) built with TensorFlow/Keras to generate photorealistic celebrity faces from the CelebA dataset.
- It’s research/experimental code rather than a full-stack or production microservice system.

##### File structure
- Top-level:
- LICENSE
- Lab10_DL__Debo (1).ipynb – the Jupyter notebook orchestrating experiments and visualizations
- README.md – project description
- According to the README, three key directories exist (even if not in the file tree snippet):
- dataset/ – raw & pre-processed CelebA images
- gan/ – model definitions (generator + discriminator), custom training loops, callbacks
- samples/ – snapshots of generated faces by epoch

##### README for additional insights
- Core features: DCGAN-style generator/discriminator, label smoothing, dropout, BatchNorm, custom GANMonitor callbacks.
- Tech stack: TensorFlow, Keras, Matplotlib.
- Workflow: ingest dataset → train GAN with stabilizing techniques → monitor & save samples.

##### Detail without over-splitting
- Essential pieces: data ingestion, two sub-models, training orchestration, monitoring outputs

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Notebook Orchestrator"
        Notebook["Jupyter Notebook\n(Lab10_DL__Debo (1).ipynb)"]:::orchestrator
    end

    subgraph "Dataset Pipeline"
        DataStorage["Dataset Storage\n(dataset/)"]:::storage
        DataPreprocessor["Data Preprocessor\n(gan/data_pipeline.py)"]:::model
    end

    subgraph "GAN Module"
        Generator["Generator Model\n(gan/generator.py)"]:::model
        Discriminator["Discriminator Model\n(gan/discriminator.py)"]:::model
    end

    TrainingLoop["Training Loop\n(label smoothing, dropout, BatchNorm)\n(gan/training.py)"]:::loop
    GANMonitor["GANMonitor Callback\n(gan/callbacks.py)"]:::monitor

    subgraph "Output"
        OutputStorage["Sample Output Storage\n(samples/)"]:::storage
    end

    subgraph "Documentation"
        README["README.md"]:::docs
        LICENSE["LICENSE"]:::docs
    end

    Notebook -->|"loads dataset and modules"| DataStorage
    DataStorage -->|"reads images"| DataPreprocessor
    Notebook -->|"initiates training"| TrainingLoop
    DataPreprocessor -->|"real image batches"| TrainingLoop
    TrainingLoop -->|"generate noise vectors"| Generator
    Generator -->|"fake images"| TrainingLoop
    TrainingLoop -->|"evaluate real & fake"| Discriminator
    TrainingLoop -->|"invoke at intervals"| GANMonitor
    GANMonitor -->|"save sample grids"| OutputStorage

    %% Click events
    click DataStorage "https://github.com/debopriya-ai/celebgan/tree/main/dataset/"
    click DataPreprocessor "https://github.com/debopriya-ai/celebgan/blob/main/gan/data_pipeline.py"
    click Generator "https://github.com/debopriya-ai/celebgan/blob/main/gan/generator.py"
    click Discriminator "https://github.com/debopriya-ai/celebgan/blob/main/gan/discriminator.py"
    click TrainingLoop "https://github.com/debopriya-ai/celebgan/blob/main/gan/training.py"
    click GANMonitor "https://github.com/debopriya-ai/celebgan/blob/main/gan/callbacks.py"
    click OutputStorage "https://github.com/debopriya-ai/celebgan/tree/main/samples/"
    click Notebook "https://github.com/debopriya-ai/celebgan/blob/main/Lab10_DL__Debo (1).ipynb"
    click README "https://github.com/debopriya-ai/celebgan/blob/main/README.md"
    click LICENSE "https://github.com/debopriya-ai/celebgan/tree/main/LICENSE"

    %% Styles
    classDef storage fill:#bbdefb,stroke:#0d47a1,color:#0d47a1;
    classDef model fill:#c8e6c9,stroke:#2e7d32,color:#2e7d32;
    classDef loop fill:#fff9c4,stroke:#f9a825,color:#f57f17;
    classDef monitor fill:#ffecb3,stroke:#ef6c00,color:#e65100;
    classDef orchestrator fill:#d1c4e9,stroke:#6a1b9a,color:#4a148c;
    classDef docs fill:#f0f4c3,stroke:#827717,color:#827717;
```
