# si-1-han/2026nemonemo architecture

> Architecture diagram of the GitHub repository si-1-han/2026nemonemo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/si-1-han/2026nemonemo
- Repository: https://github.com/si-1-han/2026nemonemo

## Overview

네모네모 is a real-time mobile document scanner, with a Python reference implementation for algorithm evaluation and a PC demo. The user’s main flow is camera preview → live corner detection and stabilization → capture → perspective correction and image enhancement → scan result. The README documents the Flutter camera/pipeline structure and capture behavior; the Python orchestration and algorithm modules are excerpted, but most Dart runtime implementations are not, so their internal links rely on the documented structure rather than inspected calls.

Main entry points: [`app/lib/pipeline/scanner.dart`](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/scanner.dart) (Scan orchestration), [`python/scanner/pipeline.py`](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/pipeline.py) (Scan orchestration), [`app/lib/screens/scan_screen.dart`](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/screens/scan_screen.dart) (Scan screen), [`python/experiments/dataset.py`](https://github.com/si-1-han/2026nemonemo/blob/main/python/experiments/dataset.py) (Evaluation dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile scanning"]
  node_camera["Camera frames"]
  node_frame_loop["Live frame loop"]
  node_scan_screen["Scan screen<br/>[scan_screen.dart]"]
  node_overlay["Corner overlay<br/>[quad_overlay.dart]"]
  node_result_screen["Scan result<br/>[result_screen.dart]"]
end

subgraph group_vision["Vision pipeline"]
  node_dart_scanner["Scan orchestration<br/>[scanner.dart]"]
  node_dart_preprocess["Preprocessing<br/>[preprocess.dart]"]
  node_dart_edges["Edge detection<br/>[edges.dart]"]
  node_dart_detect["Document corners<br/>[detect.dart]"]
  node_dart_tracker["Corner stabilization<br/>[tracker.dart]"]
  node_dart_warp["Perspective warp<br/>[warp.dart]"]
  node_dart_enhance["Image enhancement<br/>[enhance.dart]"]
end

subgraph group_reference["Python reference"]
  node_py_pipeline["Scan orchestration<br/>[pipeline.py]"]
  node_py_preprocess["Preprocessing<br/>[preprocess.py]"]
  node_py_edges["Edge detection<br/>[edges.py]"]
  node_py_detect["Document corners<br/>[detect.py]"]
  node_py_tracker["Corner stabilization<br/>[tracker.py]"]
  node_py_warp["Perspective warp<br/>[warp.py]"]
  node_py_enhance["Image enhancement<br/>[enhance.py]"]
  node_py_synthetic["Synthetic scenes<br/>[synthetic.py]"]
end

subgraph group_evaluation["Evaluation data"]
  node_dataset["Evaluation dataset<br/>[dataset.py]"]
  node_evaluator["Detection evaluation<br/>[evaluate.py]"]
  node_raw_data[("Test photos")]
  node_labels["Corner labels<br/>[labels.json]"]
  node_golden[("Golden data")]
end

node_user(("Scanner user"))

node_user -->|"starts scan"| node_scan_screen
node_scan_screen -->|"opens camera"| node_camera
node_camera -->|"converts frames"| node_frame_loop
node_frame_loop -->|"processes frames"| node_dart_scanner
node_dart_scanner -->|"preprocesses"| node_dart_preprocess
node_dart_scanner -->|"detects edges"| node_dart_edges
node_dart_scanner -->|"finds corners"| node_dart_detect
node_dart_scanner -->|"stabilizes corners"| node_dart_tracker
node_frame_loop -->|"renders corners"| node_overlay
node_user -->|"captures image"| node_scan_screen
node_scan_screen -->|"processes capture"| node_dart_scanner
node_dart_scanner -->|"warps document"| node_dart_warp
node_dart_scanner -->|"enhances image"| node_dart_enhance
node_scan_screen -->|"shows scan"| node_result_screen
node_result_screen -->|"saves or shares"| node_user
node_py_pipeline -->|"preprocesses"| node_py_preprocess
node_py_pipeline -->|"detects edges"| node_py_edges
node_py_pipeline -->|"finds corners"| node_py_detect
node_py_pipeline -->|"warps capture"| node_py_warp
node_py_pipeline -->|"enhances capture"| node_py_enhance
node_dataset -->|"generates scenes"| node_py_synthetic
node_dataset -->|"loads photos"| node_raw_data
node_dataset -->|"loads labels"| node_labels
node_evaluator -->|"runs detection"| node_py_pipeline
node_evaluator -->|"reads photos"| node_raw_data
node_evaluator -->|"compares corners"| node_labels
node_py_synthetic -.->|"generates fixtures"| node_golden
node_dart_scanner -.->|"captures when stable"| node_dart_tracker

click node_camera "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/camera/frame_converter.dart"
click node_frame_loop "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/camera/frame_processor.dart"
click node_scan_screen "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/screens/scan_screen.dart"
click node_overlay "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/widgets/quad_overlay.dart"
click node_result_screen "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/screens/result_screen.dart"
click node_dart_scanner "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/scanner.dart"
click node_dart_preprocess "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/preprocess.dart"
click node_dart_edges "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/edges.dart"
click node_dart_detect "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/detect.dart"
click node_dart_tracker "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/tracker.dart"
click node_dart_warp "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/warp.dart"
click node_dart_enhance "https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/enhance.dart"
click node_py_pipeline "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/pipeline.py"
click node_py_preprocess "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/preprocess.py"
click node_py_edges "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/edges.py"
click node_py_detect "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/detect.py"
click node_py_tracker "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/tracker.py"
click node_py_warp "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/warp.py"
click node_py_enhance "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/enhance.py"
click node_py_synthetic "https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/synthetic.py"
click node_dataset "https://github.com/si-1-han/2026nemonemo/blob/main/python/experiments/dataset.py"
click node_evaluator "https://github.com/si-1-han/2026nemonemo/blob/main/python/evaluate.py"
click node_raw_data "https://github.com/si-1-han/2026nemonemo/tree/main/data/raw"
click node_labels "https://github.com/si-1-han/2026nemonemo/blob/main/data/labels.json"
click node_golden "https://github.com/si-1-han/2026nemonemo/tree/main/data/golden"

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_camera,node_frame_loop,node_scan_screen,node_overlay,node_result_screen,node_user toneBlue
class node_dart_scanner,node_dart_preprocess,node_dart_edges,node_dart_detect,node_dart_tracker,node_dart_warp,node_dart_enhance toneAmber
class node_py_pipeline,node_py_preprocess,node_py_edges,node_py_detect,node_py_tracker,node_py_warp,node_py_enhance,node_py_synthetic toneMint
class node_dataset,node_evaluator,node_raw_data,node_labels,node_golden toneRose
```

## Components

### Mobile scanning

- [Camera frames](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/camera/frame_converter.dart): `app/lib/camera/frame_converter.dart`
- [Live frame loop](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/camera/frame_processor.dart): `app/lib/camera/frame_processor.dart`
- [Scan screen](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/screens/scan_screen.dart): `app/lib/screens/scan_screen.dart`
- [Corner overlay](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/widgets/quad_overlay.dart): `app/lib/widgets/quad_overlay.dart`
- [Scan result](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/screens/result_screen.dart): `app/lib/screens/result_screen.dart`

### Vision pipeline

- [Scan orchestration](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/scanner.dart): `app/lib/pipeline/scanner.dart`
- [Preprocessing](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/preprocess.dart): `app/lib/pipeline/preprocess.dart`
- [Edge detection](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/edges.dart): `app/lib/pipeline/edges.dart`
- [Document corners](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/detect.dart): `app/lib/pipeline/detect.dart`
- [Corner stabilization](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/tracker.dart): `app/lib/pipeline/tracker.dart`
- [Perspective warp](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/warp.dart): `app/lib/pipeline/warp.dart`
- [Image enhancement](https://github.com/si-1-han/2026nemonemo/blob/main/app/lib/pipeline/enhance.dart): `app/lib/pipeline/enhance.dart`

### Python reference

- [Scan orchestration](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/pipeline.py): `python/scanner/pipeline.py`
- [Preprocessing](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/preprocess.py): `python/scanner/preprocess.py`
- [Edge detection](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/edges.py): `python/scanner/edges.py`
- [Document corners](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/detect.py): `python/scanner/detect.py`
- [Corner stabilization](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/tracker.py): `python/scanner/tracker.py`
- [Perspective warp](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/warp.py): `python/scanner/warp.py`
- [Image enhancement](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/enhance.py): `python/scanner/enhance.py`
- [Synthetic scenes](https://github.com/si-1-han/2026nemonemo/blob/main/python/scanner/synthetic.py): `python/scanner/synthetic.py`

### Evaluation data

- [Evaluation dataset](https://github.com/si-1-han/2026nemonemo/blob/main/python/experiments/dataset.py): `python/experiments/dataset.py`
- [Detection evaluation](https://github.com/si-1-han/2026nemonemo/blob/main/python/evaluate.py): `python/evaluate.py`
- [Test photos](https://github.com/si-1-han/2026nemonemo/tree/main/data/raw): `data/raw`
- [Corner labels](https://github.com/si-1-han/2026nemonemo/blob/main/data/labels.json): `data/labels.json`
- [Golden data](https://github.com/si-1-han/2026nemonemo/tree/main/data/golden): `data/golden`

### Other components

- **Scanner user**

## Connections

- Scanner user → Scan screen: starts scan (evidence: `README.md`)
- Scan screen → Camera frames: opens camera (evidence: `README.md`)
- Camera frames → Live frame loop: converts frames (evidence: `README.md`)
- Live frame loop → Scan orchestration: processes frames (evidence: `README.md`)
- Scan orchestration → Preprocessing: preprocesses (evidence: `README.md`)
- Scan orchestration → Edge detection: detects edges (evidence: `README.md`)
- Scan orchestration → Document corners: finds corners (evidence: `README.md`)
- Scan orchestration → Corner stabilization: stabilizes corners (evidence: `README.md`)
- Live frame loop → Corner overlay: renders corners (evidence: `README.md`)
- Scanner user → Scan screen: captures image (evidence: `README.md`)
- Scan screen → Scan orchestration: processes capture (evidence: `README.md`)
- Scan orchestration → Perspective warp: warps document (evidence: `README.md`)
- Scan orchestration → Image enhancement: enhances image (evidence: `README.md`)
- Scan screen → Scan result: shows scan (evidence: `README.md`)
- Scan result → Scanner user: saves or shares (evidence: `README.md`)
- Scan orchestration → Preprocessing: preprocesses (evidence: `python/scanner/pipeline.py`)
- Scan orchestration → Edge detection: detects edges (evidence: `python/scanner/pipeline.py`)
- Scan orchestration → Document corners: finds corners (evidence: `python/scanner/pipeline.py`)
- Scan orchestration → Perspective warp: warps capture (evidence: `python/scanner/pipeline.py`)
- Scan orchestration → Image enhancement: enhances capture (evidence: `python/scanner/pipeline.py`)
- Evaluation dataset → Synthetic scenes: generates scenes (evidence: `python/experiments/dataset.py`)
- Evaluation dataset → Test photos: loads photos (evidence: `python/experiments/dataset.py`)
- Evaluation dataset → Corner labels: loads labels (evidence: `python/experiments/dataset.py`)
- Detection evaluation → Scan orchestration: runs detection (evidence: `python/evaluate.py`)
- Detection evaluation → Test photos: reads photos (evidence: `python/evaluate.py`)
- Detection evaluation → Corner labels: compares corners (evidence: `python/evaluate.py`)
- Synthetic scenes → Golden data: generates fixtures (evidence: `README.md`)
- Scan orchestration → Corner stabilization: captures when stable (evidence: `README.md`)
