# harry-1391453181620-developer-group/nix-vision-pro architecture

> Architecture diagram of the GitHub repository harry-1391453181620-developer-group/nix-vision-pro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harry-1391453181620-developer-group/nix-vision-pro
- Repository: https://github.com/harry-1391453181620-developer-group/nix-vision-pro

## Overview

Nix Vision Pro trains and runs image classifiers through a backend-dispatching CLI or inference GUI. The main path discovers dataset classes, loads and preprocesses images, trains a model, and saves checkpoints; prediction reconstructs model settings and produces class scores. PyTorch is the default and includes optional tokenized dynamics and advanced training policies; NumPy remains a maintained comparison and fallback backend. Edges reflect README statements and SOURCE INDEX references; unsampled implementation details are represented only where documented.

Main entry points: [`backends/torch/train_backend.py`](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/train_backend.py) (Torch training), [`backends/numpy/train_backend.py`](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/train_backend.py) (NumPy training), [`data/loaders.py`](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/data/loaders.py) (Image loading), [`data/preprocessing.py`](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/data/preprocessing.py) (Image preprocessing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_train_cli["Training CLI<br/>[train.py]"]
  node_predict_cli["Prediction CLI<br/>[predict.py]"]
  node_gui_cli["GUI CLI<br/>[gui.py]"]
end

subgraph group_shared["Shared runtime"]
  node_dataset[("Image dataset")]
  node_class_config["Class configuration<br/>[config.py]"]
  node_image_loader["Image loading<br/>[loaders.py]"]
  node_preprocessing["Image preprocessing<br/>[preprocessing.py]"]
  node_safety["Dataset safety<br/>[safety.py]"]
  node_policies["Training policies<br/>[training.py]"]
end

subgraph group_torch["PyTorch backend"]
  node_torch_trainer["Torch training<br/>[train_backend.py]"]
  node_torch_model["Torch classifier<br/>[model.py]"]
  node_torch_predict["Torch inference<br/>[predict_backend.py]"]
  node_torch_gui["Torch inference GUI<br/>[gui_backend.py]"]
end

subgraph group_numpy["NumPy backend"]
  node_numpy_trainer["NumPy training<br/>[train_backend.py]"]
  node_numpy_model["NumPy classifier<br/>[model.py]"]
  node_numpy_predict["NumPy inference<br/>[predict_backend.py]"]
  node_numpy_gui["NumPy inference GUI<br/>[gui_backend.py]"]
end

subgraph group_artifacts["Runtime artifacts"]
  node_plotting["Training plots<br/>[plot.py]"]
  node_checkpoints[("Model checkpoints")]
  node_run_artifacts[("Run artifacts")]
end

node_user(("User"))

node_user -->|"starts training"| node_train_cli
node_user -->|"requests prediction"| node_predict_cli
node_user -->|"opens GUI"| node_gui_cli
node_train_cli -->|"dispatches"| node_torch_trainer
node_train_cli -->|"dispatches"| node_numpy_trainer
node_predict_cli -->|"dispatches"| node_torch_predict
node_predict_cli -->|"dispatches"| node_numpy_predict
node_gui_cli -->|"dispatches"| node_torch_gui
node_gui_cli -->|"dispatches"| node_numpy_gui
node_torch_trainer -->|"resolves classes"| node_class_config
node_numpy_trainer -->|"resolves classes"| node_class_config
node_torch_trainer -->|"loads images"| node_image_loader
node_torch_trainer -->|"preprocesses images"| node_preprocessing
node_numpy_trainer -->|"loads images"| node_image_loader
node_numpy_trainer -->|"preprocesses images"| node_preprocessing
node_image_loader -->|"reads files"| node_dataset
node_torch_trainer -->|"guards dataset"| node_safety
node_numpy_trainer -->|"guards dataset"| node_safety
node_torch_trainer -->|"applies policies"| node_policies
node_numpy_trainer -->|"applies policies"| node_policies
node_torch_trainer -->|"trains model"| node_torch_model
node_numpy_trainer -->|"trains model"| node_numpy_model
node_torch_trainer -->|"saves weights"| node_checkpoints
node_numpy_trainer -->|"saves weights"| node_checkpoints
node_torch_trainer -->|"plots metrics"| node_plotting
node_torch_trainer -->|"writes run data"| node_run_artifacts
node_torch_predict -->|"runs inference"| node_torch_model
node_numpy_predict -->|"runs inference"| node_numpy_model
node_torch_predict -->|"loads images"| node_image_loader
node_torch_predict -->|"preprocesses images"| node_preprocessing
node_numpy_predict -->|"loads images"| node_image_loader
node_numpy_predict -->|"preprocesses images"| node_preprocessing
node_torch_gui -->|"loads model"| node_torch_model
node_torch_gui -->|"loads images"| node_image_loader
node_torch_gui -->|"preprocesses images"| node_preprocessing
node_numpy_gui -->|"loads model"| node_numpy_model
node_numpy_gui -->|"loads images"| node_image_loader
node_numpy_gui -->|"preprocesses images"| node_preprocessing
node_torch_predict -->|"loads weights"| node_checkpoints
node_numpy_predict -->|"loads weights"| node_checkpoints

click node_train_cli "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/train.py"
click node_predict_cli "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/predict.py"
click node_gui_cli "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/gui.py"
click node_class_config "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/config.py"
click node_image_loader "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/data/loaders.py"
click node_preprocessing "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/data/preprocessing.py"
click node_safety "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/utils/safety.py"
click node_policies "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/utils/training.py"
click node_torch_trainer "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/train_backend.py"
click node_torch_model "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/model.py"
click node_torch_predict "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/predict_backend.py"
click node_torch_gui "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/gui_backend.py"
click node_numpy_trainer "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/train_backend.py"
click node_numpy_model "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/model.py"
click node_numpy_predict "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/predict_backend.py"
click node_numpy_gui "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/gui_backend.py"
click node_plotting "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/plot.py"
click node_checkpoints "https://github.com/harry-1391453181620-developer-group/nix-vision-pro/tree/main/checkpoints"

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_train_cli,node_predict_cli,node_gui_cli,node_user toneBlue
class node_dataset,node_class_config,node_image_loader,node_preprocessing,node_safety,node_policies toneAmber
class node_torch_trainer,node_torch_model,node_torch_predict,node_torch_gui toneMint
class node_numpy_trainer,node_numpy_model,node_numpy_predict,node_numpy_gui toneRose
class node_plotting,node_checkpoints,node_run_artifacts toneIndigo
```

## Components

### User entry points

- [Training CLI](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/train.py): `train.py`
- [Prediction CLI](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/predict.py): `predict.py`
- [GUI CLI](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/gui.py): `gui.py`

### Shared runtime

- **Image dataset**
- [Class configuration](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/config.py): `config.py`
- [Image loading](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/data/loaders.py): `data/loaders.py`
- [Image preprocessing](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/data/preprocessing.py): `data/preprocessing.py`
- [Dataset safety](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/utils/safety.py): `utils/safety.py`
- [Training policies](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/utils/training.py): `utils/training.py`

### PyTorch backend

- [Torch training](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/train_backend.py): `backends/torch/train_backend.py`
- [Torch classifier](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/model.py): `backends/torch/model.py`
- [Torch inference](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/predict_backend.py): `backends/torch/predict_backend.py`
- [Torch inference GUI](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/torch/gui_backend.py): `backends/torch/gui_backend.py`

### NumPy backend

- [NumPy training](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/train_backend.py): `backends/numpy/train_backend.py`
- [NumPy classifier](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/model.py): `backends/numpy/model.py`
- [NumPy inference](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/predict_backend.py): `backends/numpy/predict_backend.py`
- [NumPy inference GUI](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/backends/numpy/gui_backend.py): `backends/numpy/gui_backend.py`

### Runtime artifacts

- [Training plots](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/blob/main/plot.py): `plot.py`
- [Model checkpoints](https://github.com/harry-1391453181620-developer-group/nix-vision-pro/tree/main/checkpoints): `checkpoints`
- **Run artifacts**

### Other components

- **User**

## Connections

- User → Training CLI: starts training (evidence: `README.md`)
- User → Prediction CLI: requests prediction (evidence: `README.md`)
- User → GUI CLI: opens GUI (evidence: `README.md`)
- Training CLI → Torch training: dispatches (evidence: `train.py`)
- Training CLI → NumPy training: dispatches (evidence: `train.py`)
- Prediction CLI → Torch inference: dispatches (evidence: `predict.py`)
- Prediction CLI → NumPy inference: dispatches (evidence: `predict.py`)
- GUI CLI → Torch inference GUI: dispatches (evidence: `gui.py`)
- GUI CLI → NumPy inference GUI: dispatches (evidence: `gui.py`)
- Torch training → Class configuration: resolves classes (evidence: `backends/torch/train_backend.py`)
- NumPy training → Class configuration: resolves classes (evidence: `backends/numpy/train_backend.py`)
- Torch training → Image loading: loads images (evidence: `backends/torch/train_backend.py`)
- Torch training → Image preprocessing: preprocesses images (evidence: `backends/torch/train_backend.py`)
- NumPy training → Image loading: loads images (evidence: `backends/numpy/train_backend.py`)
- NumPy training → Image preprocessing: preprocesses images (evidence: `backends/numpy/train_backend.py`)
- Image loading → Image dataset: reads files (evidence: `data/loaders.py`)
- Torch training → Dataset safety: guards dataset (evidence: `backends/torch/train_backend.py`)
- NumPy training → Dataset safety: guards dataset (evidence: `backends/numpy/train_backend.py`)
- Torch training → Training policies: applies policies (evidence: `backends/torch/train_backend.py`)
- NumPy training → Training policies: applies policies (evidence: `backends/numpy/train_backend.py`)
- Torch training → Torch classifier: trains model (evidence: `backends/torch/train_backend.py`)
- NumPy training → NumPy classifier: trains model (evidence: `backends/numpy/train_backend.py`)
- Torch training → Model checkpoints: saves weights (evidence: `README.md`)
- NumPy training → Model checkpoints: saves weights (evidence: `README.md`)
- Torch training → Training plots: plots metrics (evidence: `backends/torch/train_backend.py`)
- Torch training → Run artifacts: writes run data (evidence: `README.md`)
- Torch inference → Torch classifier: runs inference (evidence: `backends/torch/predict_backend.py`)
- NumPy inference → NumPy classifier: runs inference (evidence: `backends/numpy/predict_backend.py`)
- Torch inference → Image loading: loads images (evidence: `backends/torch/predict_backend.py`)
- Torch inference → Image preprocessing: preprocesses images (evidence: `backends/torch/predict_backend.py`)
- NumPy inference → Image loading: loads images (evidence: `backends/numpy/predict_backend.py`)
- NumPy inference → Image preprocessing: preprocesses images (evidence: `backends/numpy/predict_backend.py`)
- Torch inference GUI → Torch classifier: loads model (evidence: `backends/torch/gui_backend.py`)
- Torch inference GUI → Image loading: loads images (evidence: `backends/torch/gui_backend.py`)
- Torch inference GUI → Image preprocessing: preprocesses images (evidence: `backends/torch/gui_backend.py`)
- NumPy inference GUI → NumPy classifier: loads model (evidence: `backends/numpy/gui_backend.py`)
- NumPy inference GUI → Image loading: loads images (evidence: `backends/numpy/gui_backend.py`)
- NumPy inference GUI → Image preprocessing: preprocesses images (evidence: `backends/numpy/gui_backend.py`)
- Torch inference → Model checkpoints: loads weights (evidence: `README.md`)
- NumPy inference → Model checkpoints: loads weights (evidence: `README.md`)
