# nexarobs/image-to-keyword-prediction architecture

> Architecture diagram of the GitHub repository nexarobs/image-to-keyword-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nexarobs/image-to-keyword-prediction
- Repository: https://github.com/nexarobs/image-to-keyword-prediction

## Overview

This is an image-to-description coursework project: it preprocesses PASCAL VOC images and XML labels, trains five multi-label classifiers, compares their results, and aims to generate a template caption. The README documents these stages, but no source excerpts are available, so the graph reflects documented workflow only; notebook-level implementation details and exact runtime calls cannot be verified.

Main entry points: [`notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb`](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb) (Feature-label CSV), [`notebooks/models`](https://github.com/nexarobs/image-to-keyword-prediction/tree/main/notebooks/models) (Model comparison), [`notebooks/models/XGBoost-Model.ipynb`](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/XGBoost-Model.ipynb) (XGBoost), [`notebooks/models/projet-iti-knn-model.ipynb`](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/projet-iti-knn-model.ipynb) (KNN)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preprocessing["Data preprocessing"]
  node_imageprep["Image preparation"]
  node_sift["SIFT features"]
  node_bowpca["BoW and PCA"]
  node_xmlprep["XML label preparation"]
  node_csv["Feature-label CSV"]
end

subgraph group_modeling["Model training"]
  node_xgboost["XGBoost"]
  node_knn["KNN"]
  node_perceptron["Perceptron"]
  node_svm["SVM<br/>[svm.ipynb]"]
  node_decisiontrees["Decision trees"]
end

subgraph group_outputs["Evaluation and captions"]
  node_evaluation["Model comparison"]
  node_caption["Template caption"]
end

node_user(("Project user"))
node_voc[("PASCAL VOC 07/12")]

node_user -->|"selects dataset"| node_voc
node_voc -->|"provides images"| node_imageprep
node_voc -->|"provides XML labels"| node_xmlprep
node_imageprep -->|"prepares images"| node_sift
node_sift -->|"extracts descriptors"| node_bowpca
node_bowpca -->|"contributes features"| node_csv
node_xmlprep -->|"joins labels"| node_csv
node_csv -->|"trains on data"| node_xgboost
node_csv -->|"trains on data"| node_knn
node_csv -->|"trains on data"| node_perceptron
node_csv -->|"trains on data"| node_svm
node_csv -->|"trains on data"| node_decisiontrees
node_xgboost -->|"compares results"| node_evaluation
node_knn -->|"compares results"| node_evaluation
node_perceptron -->|"compares results"| node_evaluation
node_svm -->|"compares results"| node_evaluation
node_decisiontrees -->|"compares results"| node_evaluation
node_evaluation -->|"followed by captioning"| node_caption
node_caption -->|"describes image"| node_user

click node_imageprep "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb"
click node_sift "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb"
click node_bowpca "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb"
click node_xmlprep "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb"
click node_csv "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb"
click node_xgboost "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/XGBoost-Model.ipynb"
click node_knn "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/projet-iti-knn-model.ipynb"
click node_perceptron "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/percpetron%20(2).ipynb"
click node_svm "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/svm.ipynb"
click node_decisiontrees "https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/DecisionTrees.ipynb"
click node_evaluation "https://github.com/nexarobs/image-to-keyword-prediction/tree/main/notebooks/models"
click node_caption "https://github.com/nexarobs/image-to-keyword-prediction/tree/main/notebooks"

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_imageprep,node_sift,node_bowpca,node_xmlprep,node_csv,node_user toneBlue
class node_xgboost,node_knn,node_perceptron,node_svm,node_decisiontrees,node_voc toneAmber
class node_evaluation,node_caption toneMint
```

## Components

### Data preprocessing

- [Image preparation](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb): `notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb`
- [SIFT features](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb): `notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb`
- [BoW and PCA](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb): `notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb`
- [XML label preparation](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb): `notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb`
- [Feature-label CSV](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb): `notebooks/preprocessing/project-imageandxmlpreprocessing.ipynb`

### Model training

- [XGBoost](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/XGBoost-Model.ipynb): `notebooks/models/XGBoost-Model.ipynb`
- [KNN](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/projet-iti-knn-model.ipynb): `notebooks/models/projet-iti-knn-model.ipynb`
- [Perceptron](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/percpetron%20(2).ipynb): `notebooks/models/percpetron (2).ipynb`
- [SVM](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/svm.ipynb): `notebooks/models/svm.ipynb`
- [Decision trees](https://github.com/nexarobs/image-to-keyword-prediction/blob/main/notebooks/models/DecisionTrees.ipynb): `notebooks/models/DecisionTrees.ipynb`

### Evaluation and captions

- [Model comparison](https://github.com/nexarobs/image-to-keyword-prediction/tree/main/notebooks/models): `notebooks/models`
- [Template caption](https://github.com/nexarobs/image-to-keyword-prediction/tree/main/notebooks): `notebooks`

### Other components

- **Project user**
- **PASCAL VOC 07/12**

## Connections

- Project user → PASCAL VOC 07/12: selects dataset (evidence: `README.md`)
- PASCAL VOC 07/12 → Image preparation: provides images (evidence: `README.md`)
- PASCAL VOC 07/12 → XML label preparation: provides XML labels (evidence: `README.md`)
- Image preparation → SIFT features: prepares images (evidence: `README.md`)
- SIFT features → BoW and PCA: extracts descriptors (evidence: `README.md`)
- BoW and PCA → Feature-label CSV: contributes features (evidence: `README.md`)
- XML label preparation → Feature-label CSV: joins labels (evidence: `README.md`)
- Feature-label CSV → XGBoost: trains on data (evidence: `README.md`)
- Feature-label CSV → KNN: trains on data (evidence: `README.md`)
- Feature-label CSV → Perceptron: trains on data (evidence: `README.md`)
- Feature-label CSV → SVM: trains on data (evidence: `README.md`)
- Feature-label CSV → Decision trees: trains on data (evidence: `README.md`)
- XGBoost → Model comparison: compares results (evidence: `README.md`)
- KNN → Model comparison: compares results (evidence: `README.md`)
- Perceptron → Model comparison: compares results (evidence: `README.md`)
- SVM → Model comparison: compares results (evidence: `README.md`)
- Decision trees → Model comparison: compares results (evidence: `README.md`)
- Model comparison → Template caption: followed by captioning (evidence: `README.md`)
- Template caption → Project user: describes image (evidence: `README.md`)
