# krabberod/dagens-uniform architecture

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

- Interactive diagram: https://gitdiagram.com/krabberod/dagens-uniform
- Repository: https://github.com/krabberod/dagens-uniform

## Overview

Dagens uniform is a research workflow that turns outfit photographs into a scored specimen dataset, measures garment similarity, tests whether photo partners match, and presents the findings. The graph follows the documented pipeline while distinguishing automated scoring, human review, analysis, and figure generation. Some analysis and browser-tool implementation is not in the supplied tree; those subsystems are represented only at the documented directory level, and uncertain links are omitted.

Main entry points: [`demo/make_demo_data.py`](https://github.com/krabberod/dagens-uniform/blob/main/demo/make_demo_data.py) (Scored specimens), [`02_scripts/analysis`](https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis) (Similarity distances), [`02_scripts/classify/27_classify_and_sample_colors_with_local_vlm.py`](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/classify/27_classify_and_sample_colors_with_local_vlm.py) (Garment classification), [`02_scripts/ingest/01_build_photo_inventory.py`](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/ingest/01_build_photo_inventory.py) (Photo inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingest and scoring"]
  node_photos["Photographs"]
  node_demo["Synthetic data generator<br/>[make_demo_data.py]"]
  node_inventory["Photo inventory"]
  node_template["Specimen template"]
  node_classify["Garment classification"]
  node_specimens["Scored specimens<br/>[make_demo_data.py]"]
end

subgraph group_quality["Review and colour"]
  node_corrections["Scoring corrections"]
  node_review["QA and consensus"]
  node_palette["Palette refinement"]
  node_colourlib["Colour science<br/>[colourlib.py]"]
end

subgraph group_analysis["Analysis and tests"]
  node_distance["Similarity distances"]
  node_ordination["Ordination"]
  node_tests["Permutation and seasonal tests"]
  node_accumulation["Outfit accumulation"]
end

subgraph group_presentation["Figures and outputs"]
  node_figures["Analysis figures"]
  node_photo_grid["Photo colour grid"]
  node_outfit_stacks["Person outfit stacks"]
  node_scene["Interactive 3D scene"]
  node_results["Tables and figures"]
end

node_researcher(("Researcher"))
node_ollama["Local VLM"]

node_researcher -->|"provides"| node_photos
node_researcher -->|"runs"| node_demo
node_demo -->|"generates"| node_specimens
node_photos -->|"inventories"| node_inventory
node_inventory -->|"seeds"| node_template
node_template -->|"scores"| node_classify
node_classify -.->|"queries"| node_ollama
node_classify -->|"writes scores"| node_specimens
node_researcher -->|"corrects"| node_corrections
node_corrections -->|"updates"| node_specimens
node_researcher -->|"reviews"| node_review
node_review -->|"checks"| node_specimens
node_palette -->|"uses colour math"| node_colourlib
node_researcher -->|"refines"| node_palette
node_specimens -->|"scores characters"| node_distance
node_colourlib -->|"measures colour"| node_distance
node_distance -->|"ordains"| node_ordination
node_distance -->|"tests similarity"| node_tests
node_specimens -->|"supplies metadata"| node_tests
node_specimens -->|"counts combinations"| node_accumulation
node_ordination -->|"provides coordinates"| node_figures
node_specimens -->|"provides specimen data"| node_figures
node_specimens -->|"reads specimen data"| node_photo_grid
node_specimens -->|"reads appearances"| node_outfit_stacks
node_ordination -->|"provides coordinates"| node_scene
node_scene -->|"exports scene"| node_results
node_figures -->|"writes figures"| node_results
node_photo_grid -->|"writes grid"| node_results
node_outfit_stacks -->|"writes stacks"| node_results
node_tests -->|"writes results"| node_results
node_accumulation -->|"writes estimates"| node_results

click node_demo "https://github.com/krabberod/dagens-uniform/blob/main/demo/make_demo_data.py"
click node_inventory "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/ingest/01_build_photo_inventory.py"
click node_template "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/ingest/03_build_specimen_template.py"
click node_classify "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/classify/27_classify_and_sample_colors_with_local_vlm.py"
click node_specimens "https://github.com/krabberod/dagens-uniform/blob/main/demo/make_demo_data.py"
click node_corrections "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/classify/50_hand_corrections.py"
click node_review "https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/review"
click node_palette "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/ingest/47_reduce_categories.py"
click node_colourlib "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/colourlib.py"
click node_distance "https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis"
click node_ordination "https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis"
click node_tests "https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis"
click node_accumulation "https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis"
click node_figures "https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis"
click node_photo_grid "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/analysis/18_photo_color_grid.py"
click node_outfit_stacks "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/analysis/48_person_outfit_stacks.py"
click node_scene "https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/analysis/53_export_3d_scene.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_photos,node_demo,node_inventory,node_template,node_classify,node_specimens toneBlue
class node_corrections,node_review,node_palette,node_colourlib toneAmber
class node_distance,node_ordination,node_tests,node_accumulation toneMint
class node_figures,node_photo_grid,node_outfit_stacks,node_scene,node_results toneRose
class node_researcher,node_ollama toneIndigo
```

## Components

### Ingest and scoring

- **Photographs**
- [Synthetic data generator](https://github.com/krabberod/dagens-uniform/blob/main/demo/make_demo_data.py): `demo/make_demo_data.py`
- [Photo inventory](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/ingest/01_build_photo_inventory.py): `02_scripts/ingest/01_build_photo_inventory.py`
- [Specimen template](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/ingest/03_build_specimen_template.py): `02_scripts/ingest/03_build_specimen_template.py`
- [Garment classification](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/classify/27_classify_and_sample_colors_with_local_vlm.py): `02_scripts/classify/27_classify_and_sample_colors_with_local_vlm.py`
- [Scored specimens](https://github.com/krabberod/dagens-uniform/blob/main/demo/make_demo_data.py): `demo/make_demo_data.py`

### Review and colour

- [Scoring corrections](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/classify/50_hand_corrections.py): `02_scripts/classify/50_hand_corrections.py`
- [QA and consensus](https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/review): `02_scripts/review`
- [Palette refinement](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/ingest/47_reduce_categories.py): `02_scripts/ingest/47_reduce_categories.py`
- [Colour science](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/colourlib.py): `02_scripts/colourlib.py`

### Analysis and tests

- [Similarity distances](https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis): `02_scripts/analysis`
- [Ordination](https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis): `02_scripts/analysis`
- [Permutation and seasonal tests](https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis): `02_scripts/analysis`
- [Outfit accumulation](https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis): `02_scripts/analysis`

### Figures and outputs

- [Analysis figures](https://github.com/krabberod/dagens-uniform/tree/main/02_scripts/analysis): `02_scripts/analysis`
- [Photo colour grid](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/analysis/18_photo_color_grid.py): `02_scripts/analysis/18_photo_color_grid.py`
- [Person outfit stacks](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/analysis/48_person_outfit_stacks.py): `02_scripts/analysis/48_person_outfit_stacks.py`
- [Interactive 3D scene](https://github.com/krabberod/dagens-uniform/blob/main/02_scripts/analysis/53_export_3d_scene.py): `02_scripts/analysis/53_export_3d_scene.py`
- **Tables and figures**

### Other components

- **Researcher**
- **Local VLM**

## Connections

- Researcher → Photographs: provides
- Researcher → Synthetic data generator: runs
- Synthetic data generator → Scored specimens: generates
- Photographs → Photo inventory: inventories
- Photo inventory → Specimen template: seeds
- Specimen template → Garment classification: scores
- Garment classification → Local VLM: queries
- Garment classification → Scored specimens: writes scores
- Researcher → Scoring corrections: corrects
- Scoring corrections → Scored specimens: updates
- Researcher → QA and consensus: reviews
- QA and consensus → Scored specimens: checks
- Palette refinement → Colour science: uses colour math
- Researcher → Palette refinement: refines
- Scored specimens → Similarity distances: scores characters
- Colour science → Similarity distances: measures colour
- Similarity distances → Ordination: ordains
- Similarity distances → Permutation and seasonal tests: tests similarity
- Scored specimens → Permutation and seasonal tests: supplies metadata
- Scored specimens → Outfit accumulation: counts combinations
- Ordination → Analysis figures: provides coordinates
- Scored specimens → Analysis figures: provides specimen data
- Scored specimens → Photo colour grid: reads specimen data
- Scored specimens → Person outfit stacks: reads appearances
- Ordination → Interactive 3D scene: provides coordinates
- Interactive 3D scene → Tables and figures: exports scene
- Analysis figures → Tables and figures: writes figures
- Photo colour grid → Tables and figures: writes grid
- Person outfit stacks → Tables and figures: writes stacks
- Permutation and seasonal tests → Tables and figures: writes results
- Outfit accumulation → Tables and figures: writes estimates
