# asifahmedakash/color_recognition_unity architecture

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

- Interactive diagram: https://gitdiagram.com/asifahmedakash/color_recognition_unity
- Repository: https://github.com/asifahmedakash/color_recognition_unity

## Overview

This appears to be a Unity application combining image-based digit prediction with AR and color-selection features. The clearest evidenced runtime is the Python ZeroMQ prediction server: it receives a 28×28 float image, runs a loaded Keras model, and returns prediction bytes. The tree also shows Unity request, pixel-handling, AR, color-picker, and graph components, but their source was not excerpted and the README is empty. Accordingly, links involving those components are marked dashed and unevidenced rather than asserted as verified calls.

Main entry points: [`PythonServer/main.py`](https://github.com/asifahmedakash/color_recognition_unity/blob/main/PythonServer/main.py) (Prediction server), [`Assets/Scripts/PredictionClient.cs`](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PredictionClient.cs) (Prediction client), [`Assets/Scripts/PredictionRequester.cs`](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PredictionRequester.cs) (Prediction requester), [`Assets/ExampleAssets/Scripts/AnchorCreator.cs`](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/ExampleAssets/Scripts/AnchorCreator.cs) (AR anchor creation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prediction["Digit prediction"]
  node_python_server["Prediction server<br/>[main.py]"]
  node_model["Keras model<br/>[model.h5]"]
end

subgraph group_unity["Unity client"]
  node_unity_client["Prediction client"]
  node_requester["Prediction requester"]
  node_pixel_handler["Pixel handler<br/>[PixelHandler.cs]"]
  node_pixels_handler["Pixels handler<br/>[PixelsHandler.cs]"]
end

subgraph group_ar["AR features"]
  node_ar_anchor["AR anchor creation<br/>[AnchorCreator.cs]"]
  node_ar_plane["AR plane visualizer"]
end

subgraph group_visual["Visual tools"]
  node_color_picker["Color picker"]
  node_color_thief["Color extraction<br/>[ColorThief.cs]"]
  node_color_draw["Color drawing<br/>[DrawColor.cs]"]
  node_graph_window["Graph window<br/>[WindowGraph.cs]"]
end

node_user(("App user"))
node_zmq_client(("ZeroMQ client"))

node_user -.->|"uses"| node_unity_client
node_unity_client -.->|"dispatches"| node_requester
node_requester -.->|"uses pixels"| node_pixel_handler
node_requester -.->|"uses pixels"| node_pixels_handler
node_unity_client -.->|"requests prediction"| node_python_server
node_python_server -->|"loads"| node_model
node_zmq_client -.->|"sends image"| node_python_server
node_python_server -.->|"returns prediction"| node_zmq_client
node_user -.->|"uses AR"| node_ar_anchor
node_ar_anchor -.->|"creates scene content"| node_ar_plane
node_user -.->|"selects color"| node_color_picker
node_user -.->|"uses extraction"| node_color_thief
node_user -.->|"uses drawing"| node_color_draw
node_user -.->|"views graph"| node_graph_window

click node_unity_client "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PredictionClient.cs"
click node_requester "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PredictionRequester.cs"
click node_pixel_handler "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PixelHandler.cs"
click node_pixels_handler "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PixelsHandler.cs"
click node_python_server "https://github.com/asifahmedakash/color_recognition_unity/blob/main/PythonServer/main.py"
click node_model "https://github.com/asifahmedakash/color_recognition_unity/blob/main/PythonServer/model.h5"
click node_ar_anchor "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/ExampleAssets/Scripts/AnchorCreator.cs"
click node_ar_plane "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/ExampleAssets/Scripts/ARFeatheredPlaneMeshVisualizer.cs"
click node_color_picker "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/FlexibleColorPicker/Scripts/FlexibleColorPicker.cs"
click node_color_thief "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/ColorThief.cs"
click node_color_draw "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/DrawColor.cs"
click node_graph_window "https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/WindowGraph.cs"

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_python_server,node_model,node_user,node_zmq_client toneBlue
class node_unity_client,node_requester,node_pixel_handler,node_pixels_handler toneAmber
class node_ar_anchor,node_ar_plane toneMint
class node_color_picker,node_color_thief,node_color_draw,node_graph_window toneRose
```

## Components

### Digit prediction

- [Prediction server](https://github.com/asifahmedakash/color_recognition_unity/blob/main/PythonServer/main.py): `PythonServer/main.py`
- [Keras model](https://github.com/asifahmedakash/color_recognition_unity/blob/main/PythonServer/model.h5): `PythonServer/model.h5`

### Unity client

- [Prediction client](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PredictionClient.cs): `Assets/Scripts/PredictionClient.cs`
- [Prediction requester](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PredictionRequester.cs): `Assets/Scripts/PredictionRequester.cs`
- [Pixel handler](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PixelHandler.cs): `Assets/Scripts/PixelHandler.cs`
- [Pixels handler](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/Scripts/PixelsHandler.cs): `Assets/Scripts/PixelsHandler.cs`

### AR features

- [AR anchor creation](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/ExampleAssets/Scripts/AnchorCreator.cs): `Assets/ExampleAssets/Scripts/AnchorCreator.cs`
- [AR plane visualizer](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/ExampleAssets/Scripts/ARFeatheredPlaneMeshVisualizer.cs): `Assets/ExampleAssets/Scripts/ARFeatheredPlaneMeshVisualizer.cs`

### Visual tools

- [Color picker](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/FlexibleColorPicker/Scripts/FlexibleColorPicker.cs): `Assets/FlexibleColorPicker/Scripts/FlexibleColorPicker.cs`
- [Color extraction](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/ColorThief.cs): `Assets/ColorThief.cs`
- [Color drawing](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/DrawColor.cs): `Assets/DrawColor.cs`
- [Graph window](https://github.com/asifahmedakash/color_recognition_unity/blob/main/Assets/WindowGraph.cs): `Assets/WindowGraph.cs`

### Other components

- **App user**
- **ZeroMQ client**

## Connections

- App user → Prediction client: uses
- Prediction client → Prediction requester: dispatches
- Prediction requester → Pixel handler: uses pixels
- Prediction requester → Pixels handler: uses pixels
- Prediction client → Prediction server: requests prediction
- Prediction server → Keras model: loads (evidence: `PythonServer/main.py`)
- ZeroMQ client → Prediction server: sends image
- Prediction server → ZeroMQ client: returns prediction
- App user → AR anchor creation: uses AR
- AR anchor creation → AR plane visualizer: creates scene content
- App user → Color picker: selects color
- App user → Color extraction: uses extraction
- App user → Color drawing: uses drawing
- App user → Graph window: views graph
