# nwalablessing/adaptive-color-quantization architecture

> Architecture diagram of the GitHub repository nwalablessing/adaptive-color-quantization, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nwalablessing/adaptive-color-quantization
- Repository: https://github.com/nwalablessing/adaptive-color-quantization

## Overview

##### File structure
- Top-level artifacts:
- Autoencoder.ipynb – Jupyter notebook driving data loading, model definition, training, evaluation, and visualization
- autoencoder_cifar50_50epochs.pth – trained model weights
- comparison_table.csv – performance results (PSNR/SSIM)
- meta/ – likely contains dataset pointers, config files, or metadata
- README, report PDF, slides – documentation and results
- No separate “src/” folder; the notebook is the main orchestrator.

##### README for additional insights
- Confirms use of convolutional autoencoders
- Evaluates on PSNR & SSIM metrics over CIFAR-100

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Data Components
    DataIngestion["CIFAR-100 Dataset\n(Data Ingestion)"]:::data
    click DataIngestion "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
    
    Preprocessing["Pre-processing\n(Normalization & Patch Extraction)"]:::data
    click Preprocessing "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
    
    Meta["Metadata & Config"]:::data
    click Meta "https://github.com/nwalablessing/adaptive-color-quantization/tree/main/meta/"
    
    %% Processing Logic
    subgraph "Adaptive Quantization Controller" 
        Controller["Compute Regional Complexity\n(Controller)"]:::logic
        click Controller "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
    end
    
    subgraph "Convolutional Autoencoder" 
        Encoder["Encoder Block\n(ConvBlock Layers)"]:::model
        Decoder["Decoder Block\n(Upsample Layers)"]:::model
        click Encoder "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
        click Decoder "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
    end
    
    QuantModule["Quantization Module\n(Dynamic Bit-depth)"]:::logic
    click QuantModule "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
    
    subgraph "Training Loop"
        Training["Loss Computation & Backpropagation"]:::model
        click Training "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
        Weights["Model Weights\n(.pth)"]:::output
        click Weights "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/autoencoder_cifar50_50epochs.pth"
    end
    
    subgraph "Evaluation"
        EvalNotebook["PSNR & SSIM Calculation"]:::output
        ComparisonCSV["Results Log\n(comparison_table.csv)"]:::output
        click EvalNotebook "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Autoencoder.ipynb"
        click ComparisonCSV "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/comparison_table.csv"
    end
    
    subgraph "Documentation & Reports"
        Readme["README.md"]:::doc
        Report["Nwala_7300 Final report.pdf"]:::doc
        Slides["Power point slide.pptx"]:::doc
        click Readme "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/README.md"
        click Report "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Nwala_7300 Final report.pdf"
        click Slides "https://github.com/nwalablessing/adaptive-color-quantization/blob/main/Power point slide.pptx"
    end
    
    %% Data Flow Arrows
    DataIngestion --> Preprocessing
    Preprocessing --> Controller
    Preprocessing --> Encoder
    Controller --> QuantModule
    Encoder --> QuantModule
    QuantModule --> Decoder
    Decoder --> Training
    Training --> Weights
    Decoder --> EvalNotebook
    QuantModule --> EvalNotebook
    EvalNotebook --> ComparisonCSV
    
    %% Styles
    classDef data fill:#cce5ff,stroke:#0066cc;
    classDef model fill:#d4edda,stroke:#155724;
    classDef logic fill:#fff3cd,stroke:#856404;
    classDef output fill:#e2e3e5,stroke:#6c757d;
    classDef doc fill:#f5e1ff,stroke:#6f42c1;
```
