# neeravbhuyan/ghostfaces architecture

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

- Interactive diagram: https://gitdiagram.com/neeravbhuyan/ghostfaces
- Repository: https://github.com/neeravbhuyan/ghostfaces

## Overview

GhostFaces is documented as a facial-recognition workflow: grayscale face images are standardized and vectorized, training images are mean-centered, Thin SVD supplies eigenfaces, and projected features feed a linear SVM for identity classification. The README also describes dataset splitting, evaluation metrics, and plots of the average face and eigenfaces. The supplied tree shows identity-named `faceset` directories but no implementation files, so computation nodes have null paths; edges reflect README documentation, not inspected source.

Main entry points: [`faceset`](https://github.com/neeravbhuyan/ghostfaces/tree/main/faceset) (Face images)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Face inputs"]
  node_images[("Face images")]
  node_load["Load and resize"]
  node_vectorize["Vectorize images"]
end

subgraph group_features["Eigenface features"]
  node_center["Mean centering"]
  node_mean["Average face"]
  node_svd["Thin SVD"]
  node_eigenfaces["Eigenfaces"]
  node_project["Subspace projection"]
  node_weights["Face weights"]
end

subgraph group_recognition["Recognition"]
  node_split["Dataset splitting"]
  node_svm["Linear SVM"]
  node_identity["Predicted identity"]
end

subgraph group_analysis["Evaluation and plots"]
  node_metrics["Evaluation metrics"]
  node_plots["Face visualizations"]
end

node_user(("Recognition user"))

node_user -->|"provides"| node_images
node_images -->|"loads and resizes"| node_load
node_load -->|"flattens"| node_vectorize
node_vectorize -->|"centers"| node_center
node_center -->|"calculates"| node_mean
node_center -->|"forms matrix"| node_svd
node_svd -->|"extracts"| node_eigenfaces
node_center -->|"projects centered faces"| node_project
node_eigenfaces -->|"defines subspace"| node_project
node_project -->|"produces"| node_weights
node_weights -->|"trains and classifies"| node_svm
node_user -->|"submits unknown face"| node_svm
node_mean -->|"centers inference face"| node_svm
node_eigenfaces -->|"projects inference face"| node_svm
node_svm -->|"classifies"| node_identity
node_weights -->|"splits features"| node_split
node_split -->|"evaluates"| node_metrics
node_mean -->|"plots average face"| node_plots
node_eigenfaces -->|"plots components"| node_plots

click node_images "https://github.com/neeravbhuyan/ghostfaces/tree/main/faceset"

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_images,node_load,node_vectorize,node_user toneBlue
class node_center,node_mean,node_svd,node_eigenfaces,node_project,node_weights toneAmber
class node_split,node_svm,node_identity toneMint
class node_metrics,node_plots toneRose
```

## Components

### Face inputs

- [Face images](https://github.com/neeravbhuyan/ghostfaces/tree/main/faceset): `faceset`
- **Load and resize**
- **Vectorize images**

### Eigenface features

- **Mean centering**
- **Average face**
- **Thin SVD**
- **Eigenfaces**
- **Subspace projection**
- **Face weights**

### Recognition

- **Dataset splitting**
- **Linear SVM**
- **Predicted identity**

### Evaluation and plots

- **Evaluation metrics**
- **Face visualizations**

### Other components

- **Recognition user**

## Connections

- Recognition user → Face images: provides
- Face images → Load and resize: loads and resizes
- Load and resize → Vectorize images: flattens
- Vectorize images → Mean centering: centers
- Mean centering → Average face: calculates
- Mean centering → Thin SVD: forms matrix
- Thin SVD → Eigenfaces: extracts
- Mean centering → Subspace projection: projects centered faces
- Eigenfaces → Subspace projection: defines subspace
- Subspace projection → Face weights: produces
- Face weights → Linear SVM: trains and classifies
- Recognition user → Linear SVM: submits unknown face
- Average face → Linear SVM: centers inference face
- Eigenfaces → Linear SVM: projects inference face
- Linear SVM → Predicted identity: classifies
- Face weights → Dataset splitting: splits features
- Dataset splitting → Evaluation metrics: evaluates
- Average face → Face visualizations: plots average face
- Eigenfaces → Face visualizations: plots components
