# pluto13x/rock-paper-scissors-classification architecture

> Architecture diagram of the GitHub repository pluto13x/rock-paper-scissors-classification, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pluto13x/rock-paper-scissors-classification
- Repository: https://github.com/pluto13x/rock-paper-scissors-classification

## Overview

This is a small rock–paper–scissors image-classification experiment. Its workflow reads labeled images from the three category directories, resizes and binarizes them, extracts grid and line features, then splits the examples, fits a 3-neighbor classifier, and reports held-out accuracy. Feature calculations live in `features.py`; image binarization is implemented in `funkcijenevezano.py`. The README identifies a dataset and presentation, but gives no additional runtime wiring, so the graph reflects the sampled `main.py` workflow.

Main entry points: [`main.py`](https://github.com/pluto13x/rock-paper-scissors-classification/blob/main/main.py) (Experiment Workflow), [`kamen`](https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/kamen) (Rock Images), [`papir`](https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/papir) (Paper Images), [`makaze`](https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/makaze) (Scissors Images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Labeled Images"]
  node_rock[("Rock Images")]
  node_paper[("Paper Images")]
  node_scissors[("Scissors Images")]
end

subgraph group_processing["Image Processing"]
  node_image_utils["Image Utilities"]
  node_features["Feature Extraction<br/>[features.py]"]
end

subgraph group_model["Classification"]
  node_main["Experiment Workflow<br/>[main.py]"]
  node_split["Train Test Split"]
  node_knn["KNN Classifier"]
  node_metrics["Accuracy Metric"]
end

node_main -->|"reads images"| node_rock
node_main -->|"reads images"| node_paper
node_main -->|"reads images"| node_scissors
node_main -->|"binarizes images"| node_image_utils
node_main -->|"extracts features"| node_features
node_main -->|"splits data"| node_split
node_main -->|"fits and predicts"| node_knn
node_main -->|"scores predictions"| node_metrics

click node_rock "https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/kamen"
click node_paper "https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/papir"
click node_scissors "https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/makaze"
click node_main "https://github.com/pluto13x/rock-paper-scissors-classification/blob/main/main.py"
click node_image_utils "https://github.com/pluto13x/rock-paper-scissors-classification/blob/main/funkcijenevezano.py"
click node_features "https://github.com/pluto13x/rock-paper-scissors-classification/blob/main/features.py"

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_rock,node_paper,node_scissors toneBlue
class node_image_utils,node_features toneAmber
class node_main,node_split,node_knn,node_metrics toneMint
```

## Components

### Labeled Images

- [Rock Images](https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/kamen): `kamen`
- [Paper Images](https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/papir): `papir`
- [Scissors Images](https://github.com/pluto13x/rock-paper-scissors-classification/tree/main/makaze): `makaze`

### Image Processing

- [Image Utilities](https://github.com/pluto13x/rock-paper-scissors-classification/blob/main/funkcijenevezano.py): `funkcijenevezano.py`
- [Feature Extraction](https://github.com/pluto13x/rock-paper-scissors-classification/blob/main/features.py): `features.py`

### Classification

- [Experiment Workflow](https://github.com/pluto13x/rock-paper-scissors-classification/blob/main/main.py): `main.py`
- **Train Test Split**
- **KNN Classifier**
- **Accuracy Metric**

## Connections

- Experiment Workflow → Rock Images: reads images (evidence: `main.py`)
- Experiment Workflow → Paper Images: reads images (evidence: `main.py`)
- Experiment Workflow → Scissors Images: reads images (evidence: `main.py`)
- Experiment Workflow → Image Utilities: binarizes images (evidence: `main.py`)
- Experiment Workflow → Feature Extraction: extracts features (evidence: `main.py`)
- Experiment Workflow → Train Test Split: splits data (evidence: `main.py`)
- Experiment Workflow → KNN Classifier: fits and predicts (evidence: `main.py`)
- Experiment Workflow → Accuracy Metric: scores predictions (evidence: `main.py`)
