# vanogamer/facefinderpro architecture

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

- Interactive diagram: https://gitdiagram.com/vanogamer/facefinderpro
- Repository: https://github.com/vanogamer/facefinderpro
- Video tour (about a minute): https://gitdiagram.com/vanogamer/facefinderpro/video

## Overview

Face Scanner is a Tkinter desktop application for recognizing people in photo collections, routing results, and managing long or interrupted scans. The main workflow checks reference-photo quality, prepares face embeddings, scans a selected folder, then classifies images as matches, uncertain results, duplicates, or unmatched files. README capabilities are represented alongside the workflow. Because the application is a single source file and the excerpts are partial, subsystem paths point to `index.py`; links not established by the README or sampled code are omitted.

Main entry points: [`index.py`](https://github.com/vanogamer/facefinderpro/blob/main/index.py) (Tkinter Interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop Interface"]
  node_gui["Tkinter Interface<br/>[index.py]"]
  node_progress_logging["Progress &amp; Logging<br/>[index.py]"]
  node_completion_notice["Completion Notification<br/>[index.py]"]
end

subgraph group_recognition["Recognition &amp; Routing"]
  node_quality["Reference Quality<br/>[index.py]"]
  node_embeddings["Face Embeddings<br/>[index.py]"]
  node_recognition_engine["Face Matching<br/>[index.py]"]
  node_router["Multi-Person Router<br/>[index.py]"]
  node_duplicates["Duplicate Detection<br/>[index.py]"]
  node_classification["Result Classification<br/>[index.py]"]
end

subgraph group_operations["Scan Operations"]
  node_image_scan["Image Scanning<br/>[index.py]"]
  node_matched_output["Matched Outputs"]
  node_review_queue["Review Queue<br/>[index.py]"]
  node_unmatched_output["Unmatched Results"]
  node_scan_controls["Scan Controls<br/>[index.py]"]
  node_live_watch["Live Watch<br/>[index.py]"]
  node_resource_monitor["Resource Monitoring<br/>[index.py]"]
end

subgraph group_persistence["State &amp; Results"]
  node_history_undo["History &amp; Rollback<br/>[index.py]"]
  node_scan_state["Resume State<br/>[index.py]"]
  node_results_db[("SQLite Results<br/>[index.py]")]
end

node_user(("User"))
node_directml["ONNX DirectML"]

node_user -->|"operates"| node_gui
node_gui -->|"checks references"| node_quality
node_gui -->|"prepares references"| node_embeddings
node_quality -->|"qualifies references"| node_embeddings
node_gui -->|"starts scan"| node_image_scan
node_image_scan -->|"provides images"| node_recognition_engine
node_embeddings -->|"provides references"| node_recognition_engine
node_gui -->|"starts routing"| node_router
node_router -->|"matches people"| node_recognition_engine
node_image_scan -->|"checks images"| node_duplicates
node_recognition_engine -->|"provides match result"| node_classification
node_duplicates -->|"provides duplicate result"| node_classification
node_classification -->|"routes matches"| node_matched_output
node_classification -->|"queues uncertain"| node_review_queue
node_classification -->|"routes unmatched"| node_unmatched_output
node_gui -->|"controls operation"| node_scan_controls
node_live_watch -->|"submits new files"| node_image_scan
node_resource_monitor -->|"throttles processing"| node_image_scan
node_image_scan -->|"reports progress"| node_progress_logging
node_router -->|"reports progress"| node_progress_logging
node_gui -->|"manages history"| node_history_undo
node_history_undo -->|"restores settings"| node_scan_state
node_image_scan -->|"saves scan state"| node_scan_state
node_router -->|"saves router state"| node_scan_state
node_image_scan -->|"stores results"| node_results_db
node_router -->|"stores results"| node_results_db
node_history_undo -->|"reads scan records"| node_results_db
node_embeddings -.->|"uses when available"| node_directml
node_gui -->|"notifies completion"| node_completion_notice

click node_gui "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_quality "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_embeddings "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_recognition_engine "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_image_scan "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_router "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_duplicates "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_classification "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_review_queue "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_scan_controls "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_live_watch "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_resource_monitor "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_progress_logging "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_history_undo "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_scan_state "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_results_db "https://github.com/vanogamer/facefinderpro/blob/main/index.py"
click node_completion_notice "https://github.com/vanogamer/facefinderpro/blob/main/index.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_gui,node_progress_logging,node_completion_notice,node_user toneBlue
class node_quality,node_embeddings,node_recognition_engine,node_router,node_duplicates,node_classification toneAmber
class node_image_scan,node_matched_output,node_review_queue,node_unmatched_output,node_scan_controls,node_live_watch,node_resource_monitor toneMint
class node_history_undo,node_scan_state,node_results_db toneRose
class node_directml toneIndigo
```

## Components

### Desktop Interface

- [Tkinter Interface](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Progress & Logging](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Completion Notification](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`

### Recognition & Routing

- [Reference Quality](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Face Embeddings](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Face Matching](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Multi-Person Router](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Duplicate Detection](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Result Classification](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`

### Scan Operations

- [Image Scanning](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- **Matched Outputs**
- [Review Queue](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- **Unmatched Results**
- [Scan Controls](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Live Watch](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Resource Monitoring](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`

### State & Results

- [History & Rollback](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [Resume State](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`
- [SQLite Results](https://github.com/vanogamer/facefinderpro/blob/main/index.py): `index.py`

### Other components

- **User**
- **ONNX DirectML**

## Connections

- User → Tkinter Interface: operates
- Tkinter Interface → Reference Quality: checks references
- Tkinter Interface → Face Embeddings: prepares references
- Reference Quality → Face Embeddings: qualifies references
- Tkinter Interface → Image Scanning: starts scan
- Image Scanning → Face Matching: provides images
- Face Embeddings → Face Matching: provides references
- Tkinter Interface → Multi-Person Router: starts routing
- Multi-Person Router → Face Matching: matches people
- Image Scanning → Duplicate Detection: checks images
- Face Matching → Result Classification: provides match result
- Duplicate Detection → Result Classification: provides duplicate result
- Result Classification → Matched Outputs: routes matches
- Result Classification → Review Queue: queues uncertain
- Result Classification → Unmatched Results: routes unmatched
- Tkinter Interface → Scan Controls: controls operation
- Live Watch → Image Scanning: submits new files
- Resource Monitoring → Image Scanning: throttles processing
- Image Scanning → Progress & Logging: reports progress
- Multi-Person Router → Progress & Logging: reports progress
- Tkinter Interface → History & Rollback: manages history
- History & Rollback → Resume State: restores settings
- Image Scanning → Resume State: saves scan state
- Multi-Person Router → Resume State: saves router state
- Image Scanning → SQLite Results: stores results
- Multi-Person Router → SQLite Results: stores results
- History & Rollback → SQLite Results: reads scan records
- Face Embeddings → ONNX DirectML: uses when available
- Tkinter Interface → Completion Notification: notifies completion
