# sifat192/bean-leaf-transfer-learning-pytorch architecture

> Architecture diagram of the GitHub repository sifat192/bean-leaf-transfer-learning-pytorch, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sifat192/bean-leaf-transfer-learning-pytorch
- Repository: https://github.com/sifat192/bean-leaf-transfer-learning-pytorch

## Overview

This repository is a runnable notebook project comparing a custom CNN with two GoogLeNet transfer-learning strategies on bean-leaf images. The user runs the notebook, which obtains the dataset, preprocesses and batches images, trains the models, evaluates validation performance, and presents plots and comparisons. The README documents these stages and capabilities; the notebook itself was not excerpted, so internal call-level relationships cannot be verified.

Main entry points: [`notebooks/bean_leaf_transfer_learning.ipynb`](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb) (Experiment notebook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data pipeline"]
  node_dataset["Bean leaf dataset"]
  node_preprocessing["Image preprocessing"]
  node_loaders["ImageFolder loaders"]
end

subgraph group_models["Model strategies"]
  node_custom["Custom CNN"]
  node_googlenet["GoogLeNet variants"]
end

subgraph group_experiments["Training and evaluation"]
  node_notebook["Experiment notebook"]
  node_training["Model training"]
  node_validation["Validation metrics"]
  node_plots["Learning curves"]
  node_comparison["Model comparison"]
end

node_user(("Notebook user"))

node_user -->|"runs"| node_notebook
node_notebook -->|"downloads"| node_dataset
node_notebook -->|"applies"| node_preprocessing
node_notebook -->|"loads images"| node_loaders
node_notebook -->|"defines baseline"| node_custom
node_notebook -->|"configures variants"| node_googlenet
node_notebook -->|"trains models"| node_training
node_notebook -->|"evaluates"| node_validation
node_notebook -->|"plots metrics"| node_plots
node_notebook -->|"compares results"| node_comparison

click node_notebook "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_preprocessing "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_loaders "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_custom "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_googlenet "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_training "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_validation "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_plots "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"
click node_comparison "https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dataset,node_preprocessing,node_loaders,node_user toneBlue
class node_custom,node_googlenet toneAmber
class node_notebook,node_training,node_validation,node_plots,node_comparison toneMint
```

## Components

### Data pipeline

- **Bean leaf dataset**
- [Image preprocessing](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`
- [ImageFolder loaders](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`

### Model strategies

- [Custom CNN](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`
- [GoogLeNet variants](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`

### Training and evaluation

- [Experiment notebook](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`
- [Model training](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`
- [Validation metrics](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`
- [Learning curves](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`
- [Model comparison](https://github.com/sifat192/bean-leaf-transfer-learning-pytorch/blob/main/notebooks/bean_leaf_transfer_learning.ipynb): `notebooks/bean_leaf_transfer_learning.ipynb`

### Other components

- **Notebook user**

## Connections

- Notebook user → Experiment notebook: runs (evidence: `README.md`)
- Experiment notebook → Bean leaf dataset: downloads (evidence: `README.md`)
- Experiment notebook → Image preprocessing: applies (evidence: `README.md`)
- Experiment notebook → ImageFolder loaders: loads images (evidence: `README.md`)
- Experiment notebook → Custom CNN: defines baseline (evidence: `README.md`)
- Experiment notebook → GoogLeNet variants: configures variants (evidence: `README.md`)
- Experiment notebook → Model training: trains models (evidence: `README.md`)
- Experiment notebook → Validation metrics: evaluates (evidence: `README.md`)
- Experiment notebook → Learning curves: plots metrics (evidence: `README.md`)
- Experiment notebook → Model comparison: compares results (evidence: `README.md`)
