# pithon-s/smartguard-codebase-and-results architecture

> Architecture diagram of the GitHub repository pithon-s/smartguard-codebase-and-results, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pithon-s/smartguard-codebase-and-results
- Repository: https://github.com/pithon-s/smartguard-codebase-and-results

## Overview

SmartGuard is an experimental image-classification project, not a deployed application. Its principal workflow is preparing a local binary dataset, training one of several documented model families, and evaluating trained models; saved weights and plots capture experiment outputs. The split utility is the only sampled implementation, so notebook-to-notebook calls and exact model-to-result links are not verified. The README documents these capabilities, and the graph represents them without asserting unsupported runtime connections.

Main entry points: [`Results`](https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Results) (Saved model weights), [`Code/Dataset Related Code Files/split_extra_dataset_preserve_test_train.py`](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Dataset%20Related%20Code%20Files/split_extra_dataset_preserve_test_train.py) (Dataset split utility), [`Code/Traning Code Files`](https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Code/Traning%20Code%20Files) (Training notebooks), [`Code/Evaluation Code Files`](https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Code/Evaluation%20Code%20Files) (Evaluation notebooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Dataset preparation"]
  node_splitter["Dataset split utility"]
  node_prepared[("Train/test dataset")]
end

subgraph group_training["Model training"]
  node_train_notebooks["Training notebooks"]
  node_vit_train["Google ViT training"]
  node_custom_train["Custom CNN training"]
  node_efficient_train["EfficientNet training"]
  node_tf_train["TensorFlow training<br/>[TFTrain.ipynb]"]
end

subgraph group_evaluation["Model evaluation"]
  node_eval_notebooks["Evaluation notebooks"]
  node_eval_generic["Model evaluation<br/>[EvalModel.ipynb]"]
  node_eval_vit["ViT evaluation"]
  node_eval_mobile["MobileNet evaluation"]
  node_eval_efficient["EfficientNet evaluation"]
end

subgraph group_outputs["Experiment outputs"]
  node_weights["Saved model weights"]
  node_metrics["Metrics and plots"]
end

node_user(("Experimenter"))
node_dataset[("Local images")]

node_user -->|"runs"| node_splitter
node_dataset -->|"reads images"| node_splitter
node_splitter -->|"copies and splits"| node_prepared
node_user -->|"runs"| node_train_notebooks
node_prepared -.->|"supplies data"| node_train_notebooks
node_train_notebooks -.->|"save weights"| node_weights
node_user -->|"runs"| node_eval_notebooks
node_weights -.->|"supplies models"| node_eval_notebooks
node_eval_notebooks -.->|"produce metrics"| node_metrics
node_vit_train -.->|"save weights"| node_weights
node_custom_train -.->|"save weights"| node_weights
node_efficient_train -.->|"save weights"| node_weights
node_tf_train -.->|"save weights"| node_weights
node_eval_generic -.->|"produce metrics"| node_metrics
node_eval_vit -.->|"produce metrics"| node_metrics
node_eval_mobile -.->|"produce metrics"| node_metrics
node_eval_efficient -.->|"produce metrics"| node_metrics

click node_splitter "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Dataset%20Related%20Code%20Files/split_extra_dataset_preserve_test_train.py"
click node_train_notebooks "https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Code/Traning%20Code%20Files"
click node_vit_train "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/smart-home-google-vit.ipynb"
click node_custom_train "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/TFTrainCustomModel.ipynb"
click node_efficient_train "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/TFTrainEfficientNetB0.ipynb"
click node_tf_train "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/TFTrain.ipynb"
click node_weights "https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Results"
click node_eval_notebooks "https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Code/Evaluation%20Code%20Files"
click node_eval_generic "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModel.ipynb"
click node_eval_vit "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModelGoogleVit.ipynb"
click node_eval_mobile "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModelMobileNetV2.ipynb"
click node_eval_efficient "https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModelEfficientNetB0.ipynb"
click node_metrics "https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Results"

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_splitter,node_prepared toneBlue
class node_train_notebooks,node_vit_train,node_custom_train,node_efficient_train,node_tf_train,node_dataset toneAmber
class node_eval_notebooks,node_eval_generic,node_eval_vit,node_eval_mobile,node_eval_efficient toneMint
class node_weights,node_metrics toneRose
class node_user toneIndigo
```

## Components

### Dataset preparation

- [Dataset split utility](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Dataset%20Related%20Code%20Files/split_extra_dataset_preserve_test_train.py): `Code/Dataset Related Code Files/split_extra_dataset_preserve_test_train.py`
- **Train/test dataset**

### Model training

- [Training notebooks](https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Code/Traning%20Code%20Files): `Code/Traning Code Files`
- [Google ViT training](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/smart-home-google-vit.ipynb): `Code/Traning Code Files/smart-home-google-vit.ipynb`
- [Custom CNN training](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/TFTrainCustomModel.ipynb): `Code/Traning Code Files/TFTrainCustomModel.ipynb`
- [EfficientNet training](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/TFTrainEfficientNetB0.ipynb): `Code/Traning Code Files/TFTrainEfficientNetB0.ipynb`
- [TensorFlow training](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Traning%20Code%20Files/TFTrain.ipynb): `Code/Traning Code Files/TFTrain.ipynb`

### Model evaluation

- [Evaluation notebooks](https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Code/Evaluation%20Code%20Files): `Code/Evaluation Code Files`
- [Model evaluation](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModel.ipynb): `Code/Evaluation Code Files/EvalModel.ipynb`
- [ViT evaluation](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModelGoogleVit.ipynb): `Code/Evaluation Code Files/EvalModelGoogleVit.ipynb`
- [MobileNet evaluation](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModelMobileNetV2.ipynb): `Code/Evaluation Code Files/EvalModelMobileNetV2.ipynb`
- [EfficientNet evaluation](https://github.com/pithon-s/smartguard-codebase-and-results/blob/main/Code/Evaluation%20Code%20Files/EvalModelEfficientNetB0.ipynb): `Code/Evaluation Code Files/EvalModelEfficientNetB0.ipynb`

### Experiment outputs

- [Saved model weights](https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Results): `Results`
- [Metrics and plots](https://github.com/pithon-s/smartguard-codebase-and-results/tree/main/Results): `Results`

### Other components

- **Experimenter**
- **Local images**

## Connections

- Experimenter → Dataset split utility: runs (evidence: `README.md`)
- Local images → Dataset split utility: reads images (evidence: `Code/Dataset Related Code Files/split_extra_dataset_preserve_test_train.py`)
- Dataset split utility → Train/test dataset: copies and splits (evidence: `Code/Dataset Related Code Files/split_extra_dataset_preserve_test_train.py`)
- Experimenter → Training notebooks: runs (evidence: `README.md`)
- Train/test dataset → Training notebooks: supplies data
- Training notebooks → Saved model weights: save weights
- Experimenter → Evaluation notebooks: runs (evidence: `README.md`)
- Saved model weights → Evaluation notebooks: supplies models
- Evaluation notebooks → Metrics and plots: produce metrics
- Google ViT training → Saved model weights: save weights
- Custom CNN training → Saved model weights: save weights
- EfficientNet training → Saved model weights: save weights
- TensorFlow training → Saved model weights: save weights
- Model evaluation → Metrics and plots: produce metrics
- ViT evaluation → Metrics and plots: produce metrics
- MobileNet evaluation → Metrics and plots: produce metrics
- EfficientNet evaluation → Metrics and plots: produce metrics
