# aestilog/amenoma architecture

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

- Interactive diagram: https://gitdiagram.com/aestilog/amenoma
- Repository: https://github.com/aestilog/amenoma

## Overview

Amenoma is a desktop Genshin Impact inventory scanner: the user captures the game window, scans artifacts or materials, and exports JSON for external analysis or planning tools. Its Qt application coordinates window capture, screen navigation, OCR, recognition data, and serialization; a toolbox handles artifact data conversion. Separate model-training and conversion modules support recognition-model development. Evidence is strongest for the main UI, artifact scanning, and artifact storage; some material and training internals are unsampled, so their connections are limited to indexed references and README claims.

Main entry points: [`ArtScanner/UIMain.py`](https://github.com/aestilog/amenoma/blob/main/ArtScanner/UIMain.py) (Qt application), [`ArtScanner/art_saver.py`](https://github.com/aestilog/amenoma/blob/main/ArtScanner/art_saver.py) (Artifact database), [`ArtScanner/art_scanner_logic.py`](https://github.com/aestilog/amenoma/blob/main/ArtScanner/art_scanner_logic.py) (Artifact navigation), [`ArtScanner/material_scanner_logic.py`](https://github.com/aestilog/amenoma/blob/main/ArtScanner/material_scanner_logic.py) (Material navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_ui["Qt application<br/>[UIMain.py]"]
  node_ui_layout["Main window UI<br/>[MainWindow.py]"]
  node_cli["CLI scanner<br/>[main.py]"]
end

subgraph group_scan["Scanning and export"]
  node_scanner["Artifact navigation"]
  node_material_scan["Material navigation"]
  node_ocr["Artifact OCR<br/>[ocr.py]"]
  node_names["Artifact metadata<br/>[ArtsInfo.py]"]
  node_material_names["Material metadata<br/>[MaterialInfo.py]"]
  node_helpers["Capture and correction<br/>[utils.py]"]
  node_art_db[("Artifact database<br/>[art_saver.py]")]
  node_material_export["Material export<br/>[material_saver.py]"]
end

subgraph group_tools["Data tools"]
  node_toolbox["Artifact toolbox<br/>[ToolboxMain.py]"]
end

subgraph group_models["Recognition models"]
  node_model_train["Model training"]
  node_model_arch["MobileNetV3<br/>[mobilenetv3.py]"]
  node_model_config["Model definitions<br/>[model_info.py]"]
  node_format_tools["Model converters"]
end

node_user(("User"))
node_game["Genshin Impact"]
node_json["Exported JSON"]
node_analysis(("External analyzers"))
node_planner(("External planners"))

node_user -->|"configures scan"| node_ui
node_ui -->|"renders window"| node_ui_layout
node_ui -->|"starts navigation"| node_scanner
node_ui -->|"starts navigation"| node_material_scan
node_ui -->|"requests recognition"| node_ocr
node_ui -->|"stores artifacts"| node_art_db
node_ui -->|"stores materials"| node_material_export
node_ui -->|"opens toolbox"| node_toolbox
node_cli -->|"starts navigation"| node_scanner
node_cli -->|"requests recognition"| node_ocr
node_cli -->|"stores artifacts"| node_art_db
node_scanner -->|"clicks and captures"| node_game
node_scanner -->|"captures window"| node_helpers
node_material_scan -->|"uses capture helpers"| node_helpers
node_material_scan -->|"reuses scan logic"| node_scanner
node_ocr -->|"uses definitions"| node_names
node_art_db -->|"normalizes values"| node_helpers
node_art_db -->|"uses artifact data"| node_names
node_art_db -->|"exports formats"| node_json
node_material_export -->|"exports GOOD"| node_json
node_material_scan -.->|"uses material names"| node_material_names
node_toolbox -->|"converts artifacts"| node_art_db
node_toolbox -->|"converts formats"| node_json
node_user -->|"runs scanner"| node_cli
node_model_train -->|"builds network"| node_model_arch
node_model_train -->|"uses class data"| node_names
node_format_tools -->|"builds model"| node_model_arch
node_format_tools -->|"reads model config"| node_model_config
node_analysis -->|"consumes artifacts"| node_json
node_planner -->|"consumes materials"| node_json

click node_ui "https://github.com/aestilog/amenoma/blob/main/ArtScanner/UIMain.py"
click node_ui_layout "https://github.com/aestilog/amenoma/blob/main/ArtScanner/rcc/MainWindow.py"
click node_cli "https://github.com/aestilog/amenoma/blob/main/ArtScanner/main.py"
click node_scanner "https://github.com/aestilog/amenoma/blob/main/ArtScanner/art_scanner_logic.py"
click node_material_scan "https://github.com/aestilog/amenoma/blob/main/ArtScanner/material_scanner_logic.py"
click node_ocr "https://github.com/aestilog/amenoma/blob/main/ArtScanner/ocr.py"
click node_names "https://github.com/aestilog/amenoma/blob/main/ArtScanner/ArtsInfo.py"
click node_material_names "https://github.com/aestilog/amenoma/blob/main/ArtScanner/MaterialInfo.py"
click node_helpers "https://github.com/aestilog/amenoma/blob/main/ArtScanner/utils.py"
click node_art_db "https://github.com/aestilog/amenoma/blob/main/ArtScanner/art_saver.py"
click node_material_export "https://github.com/aestilog/amenoma/blob/main/ArtScanner/material_saver.py"
click node_toolbox "https://github.com/aestilog/amenoma/blob/main/ArtScanner/ToolboxMain.py"
click node_model_train "https://github.com/aestilog/amenoma/blob/main/model_trainer/train_model_artifact.py"
click node_model_arch "https://github.com/aestilog/amenoma/blob/main/model_trainer/mobilenetv3.py"
click node_model_config "https://github.com/aestilog/amenoma/blob/main/model_trainer/model_info.py"
click node_format_tools "https://github.com/aestilog/amenoma/blob/main/model_trainer/converters/model_converter_artifact.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_ui,node_ui_layout,node_cli,node_user toneBlue
class node_scanner,node_material_scan,node_ocr,node_names,node_material_names,node_helpers,node_art_db,node_material_export toneAmber
class node_toolbox toneMint
class node_model_train,node_model_arch,node_model_config,node_format_tools toneRose
class node_game,node_json,node_analysis,node_planner toneIndigo
```

## Components

### Desktop app

- [Qt application](https://github.com/aestilog/amenoma/blob/main/ArtScanner/UIMain.py): `ArtScanner/UIMain.py`
- [Main window UI](https://github.com/aestilog/amenoma/blob/main/ArtScanner/rcc/MainWindow.py): `ArtScanner/rcc/MainWindow.py`
- [CLI scanner](https://github.com/aestilog/amenoma/blob/main/ArtScanner/main.py): `ArtScanner/main.py`

### Scanning and export

- [Artifact navigation](https://github.com/aestilog/amenoma/blob/main/ArtScanner/art_scanner_logic.py): `ArtScanner/art_scanner_logic.py`
- [Material navigation](https://github.com/aestilog/amenoma/blob/main/ArtScanner/material_scanner_logic.py): `ArtScanner/material_scanner_logic.py`
- [Artifact OCR](https://github.com/aestilog/amenoma/blob/main/ArtScanner/ocr.py): `ArtScanner/ocr.py`
- [Artifact metadata](https://github.com/aestilog/amenoma/blob/main/ArtScanner/ArtsInfo.py): `ArtScanner/ArtsInfo.py`
- [Material metadata](https://github.com/aestilog/amenoma/blob/main/ArtScanner/MaterialInfo.py): `ArtScanner/MaterialInfo.py`
- [Capture and correction](https://github.com/aestilog/amenoma/blob/main/ArtScanner/utils.py): `ArtScanner/utils.py`
- [Artifact database](https://github.com/aestilog/amenoma/blob/main/ArtScanner/art_saver.py): `ArtScanner/art_saver.py`
- [Material export](https://github.com/aestilog/amenoma/blob/main/ArtScanner/material_saver.py): `ArtScanner/material_saver.py`

### Data tools

- [Artifact toolbox](https://github.com/aestilog/amenoma/blob/main/ArtScanner/ToolboxMain.py): `ArtScanner/ToolboxMain.py`

### Recognition models

- [Model training](https://github.com/aestilog/amenoma/blob/main/model_trainer/train_model_artifact.py): `model_trainer/train_model_artifact.py`
- [MobileNetV3](https://github.com/aestilog/amenoma/blob/main/model_trainer/mobilenetv3.py): `model_trainer/mobilenetv3.py`
- [Model definitions](https://github.com/aestilog/amenoma/blob/main/model_trainer/model_info.py): `model_trainer/model_info.py`
- [Model converters](https://github.com/aestilog/amenoma/blob/main/model_trainer/converters/model_converter_artifact.py): `model_trainer/converters/model_converter_artifact.py`

### Other components

- **User**
- **Genshin Impact**
- **Exported JSON**
- **External analyzers**
- **External planners**

## Connections

- User → Qt application: configures scan (evidence: `README.md`)
- Qt application → Main window UI: renders window (evidence: `ArtScanner/UIMain.py`)
- Qt application → Artifact navigation: starts navigation (evidence: `ArtScanner/UIMain.py`)
- Qt application → Material navigation: starts navigation (evidence: `ArtScanner/UIMain.py`)
- Qt application → Artifact OCR: requests recognition (evidence: `ArtScanner/UIMain.py`)
- Qt application → Artifact database: stores artifacts (evidence: `ArtScanner/UIMain.py`)
- Qt application → Material export: stores materials (evidence: `ArtScanner/UIMain.py`)
- Qt application → Artifact toolbox: opens toolbox (evidence: `ArtScanner/UIMain.py`)
- CLI scanner → Artifact navigation: starts navigation (evidence: `ArtScanner/main.py`)
- CLI scanner → Artifact OCR: requests recognition (evidence: `ArtScanner/main.py`)
- CLI scanner → Artifact database: stores artifacts (evidence: `ArtScanner/main.py`)
- Artifact navigation → Genshin Impact: clicks and captures (evidence: `ArtScanner/art_scanner_logic.py`)
- Artifact navigation → Capture and correction: captures window (evidence: `ArtScanner/art_scanner_logic.py`)
- Material navigation → Capture and correction: uses capture helpers (evidence: `ArtScanner/material_scanner_logic.py`)
- Material navigation → Artifact navigation: reuses scan logic (evidence: `ArtScanner/material_scanner_logic.py`)
- Artifact OCR → Artifact metadata: uses definitions (evidence: `ArtScanner/ocr.py`)
- Artifact database → Capture and correction: normalizes values (evidence: `ArtScanner/art_saver.py`)
- Artifact database → Artifact metadata: uses artifact data (evidence: `ArtScanner/art_saver.py`)
- Artifact database → Exported JSON: exports formats (evidence: `README.md`)
- Material export → Exported JSON: exports GOOD (evidence: `README.md`)
- Material navigation → Material metadata: uses material names
- Artifact toolbox → Artifact database: converts artifacts (evidence: `ArtScanner/ToolboxMain.py`)
- Artifact toolbox → Exported JSON: converts formats (evidence: `ArtScanner/ToolboxMain.py`)
- User → CLI scanner: runs scanner (evidence: `README.md`)
- Model training → MobileNetV3: builds network (evidence: `model_trainer/train_model_artifact.py`)
- Model training → Artifact metadata: uses class data (evidence: `model_trainer/train_model_artifact.py`)
- Model converters → MobileNetV3: builds model (evidence: `model_trainer/converters/model_converter_artifact.py`)
- Model converters → Model definitions: reads model config (evidence: `model_trainer/converters/model_converter_artifact.py`)
- External analyzers → Exported JSON: consumes artifacts (evidence: `README.md`)
- External planners → Exported JSON: consumes materials (evidence: `README.md`)
