# mdinadia/vehicle_type_classification_vgg-16_svm architecture

> Architecture diagram of the GitHub repository mdinadia/vehicle_type_classification_vgg-16_svm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mdinadia/vehicle_type_classification_vgg-16_svm
- Repository: https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm

## Overview

##### Project Type and Purpose
- This is a machine‐learning research pipeline reproducing/extending a published paper.

##### File Structure
- Top level contains:
- VGG_SVM12.ipynb – the Colab notebook orchestrating the entire pipeline
- report.pdf – the final write-up
- README.md – project overview
- No separate “src” or “backend” directories—logic lives inside the notebook.

##### Extract Key Components from README
- Data source and balancing
- Preprocessing (resize, normalize, split, augment)
- Feature extraction modules (VGG-16, AlexNet, CNN)
- Classification modules (softmax, SVM linear & RBF)
- Evaluation & visualization

##### Main Components & Their Interactions
a. Data Ingestion & Storage
- External dataset (Kaggle) → Local data store (image folders)
b. Preprocessing
- Resize, normalize, augment → produces train/test image sets
c. Feature Extraction (deep models)
- VGG-16 (no top layers) → feature vectors
- AlexNet → feature vectors
- Custom CNN → softmax features
d. Classifier Training
- Softmax head on VGG/AlexNet/CNN
- SVM module (linear & RBF kernels) using extracted vectors
e. Evaluation & Visualization
- Confusion matrices, histograms, performance plots
f. Reporting
- Notebook outputs → report.pdf

##### Architectural Patterns & Principles
- Modular pipeline: separate data → preprocessing → feature extraction → classification → evaluation
- Reusability: extracted feature vectors are saved and reused for different classifiers
- Experiment comparability: multiple “branches” (VGG only, AlexNet, CNN, VGG+SVM)
- Orchestration via a single Jupyter/Colab notebook

1. Data Source
2. Data Preprocessing
3. Feature Extractors (branch for each)
4. Classification
- “Softmax Classifier”
- “SVM (Linear & RBF)”
– From AlexNet and CNN: “Softmax Classifier”
5. Evaluation & Visualization
6. Report Generation

##### Detail Without Over-Segmentation
- Reuse of feature vectors to highlight modularity
- Keep the flow clear and annotate all connectors

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Data Ingestion & Preprocessing
    subgraph "Data Ingestion & Preprocessing"
        DataStore["Kaggle Toyota Images (20K)"]:::data
        Preprocess["Preprocessing<br/>(resize, normalize, augment, split)"]:::data
        DataStore -->|"raw images"| Preprocess
    end

    %% Feature Extraction
    subgraph "Feature Extraction"
        VGG["VGG-16 (no top)"]:::models
        AlexNet["AlexNet (no top)"]:::models
        CNN["Custom CNN"]:::models
        Preprocess -->|"224×224 images"| VGG
        Preprocess -->|"224×224 images"| AlexNet
        Preprocess -->|"224×224 images"| CNN
    end

    %% Classification
    subgraph "Classification"
        SoftmaxVGG["Softmax Classifier<br/>(VGG-16)"]:::models
        SVM["SVM (Linear & RBF)"]:::models
        SoftmaxAlex["Softmax Classifier<br/>(AlexNet)"]:::models
        SoftmaxCNN["Softmax Classifier<br/>(CNN)"]:::models
        VGG --> SoftmaxVGG
        VGG --> SVM
        AlexNet --> SoftmaxAlex
        CNN --> SoftmaxCNN
    end

    %% Evaluation & Reporting
    subgraph "Evaluation & Reporting"
        Eval["Evaluation & Visualization<br/>(accuracy, confusion matrices, plots)"]:::evaluation
        Report["Report Generation<br/>(report.pdf)"]:::evaluation
        SoftmaxVGG --> Eval
        SVM --> Eval
        SoftmaxAlex --> Eval
        SoftmaxCNN --> Eval
        Eval --> Report
    end

    %% Artifacts
    README["README.md"]:::artifact
    GitIgnore[".gitignore"]:::artifact

    %% Click Events
    click DataStore "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click Preprocess "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click VGG "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click AlexNet "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click CNN "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click SoftmaxVGG "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click SoftmaxAlex "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click SoftmaxCNN "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click SVM "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click Eval "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/VGG_SVM12.ipynb"
    click README "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/README.md"
    click Report "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/report.pdf"
    click GitIgnore "https://github.com/mdinadia/vehicle_type_classification_vgg-16_svm/blob/main/.gitignore"

    %% Styles
    classDef data fill:#DDEEFF,stroke:#000,stroke-width:1px;
    classDef models fill:#DDFFDD,stroke:#000,stroke-width:1px;
    classDef evaluation fill:#FFEECC,stroke:#000,stroke-width:1px;
    classDef artifact fill:#EEEEEE,stroke:#666,stroke-dasharray: 2 2;
```
