# yamuna-pinjala/fashion-recommendation-system architecture

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

- Interactive diagram: https://gitdiagram.com/yamuna-pinjala/fashion-recommendation-system
- Repository: https://github.com/yamuna-pinjala/fashion-recommendation-system

## Overview

This is a Streamlit image-based fashion recommender. A user uploads an image; the app extracts a normalized ResNet50 feature vector, queries a nearest-neighbor index built from saved image features, and displays matching catalog images. The sampled app.py shows this workflow and its runtime dependencies, but the referenced pickle files are not present in the repository tree.

Main entry points: [`app.py`](https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py) (Upload and display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_streamlit["Upload and display<br/>[app.py]"]
end

subgraph group_vision["Image features"]
  node_extract["Feature extraction<br/>[app.py]"]
  node_resnet["ResNet50 model<br/>[app.py]"]
end

subgraph group_retrieval["Recommendation retrieval"]
  node_feature_store["Saved image features"]
  node_filename_store["Image filenames"]
  node_neighbors["Nearest-neighbor index<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"uploads image"| node_streamlit
node_streamlit -->|"extracts features"| node_extract
node_extract -->|"predicts features"| node_resnet
node_streamlit -->|"loads features"| node_feature_store
node_streamlit -->|"loads filenames"| node_filename_store
node_streamlit -->|"fits index"| node_neighbors
node_feature_store -->|"provides vectors"| node_neighbors
node_streamlit -->|"queries neighbors"| node_neighbors
node_neighbors -->|"returns matches"| node_streamlit
node_streamlit -->|"resolves matches"| node_filename_store
node_streamlit -->|"displays images"| node_user

click node_streamlit "https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py"
click node_extract "https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py"
click node_resnet "https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py"
click node_neighbors "https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.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_streamlit,node_user toneBlue
class node_extract,node_resnet toneAmber
class node_feature_store,node_filename_store,node_neighbors toneMint
```

## Components

### User interface

- [Upload and display](https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py): `app.py`

### Image features

- [Feature extraction](https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py): `app.py`
- [ResNet50 model](https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py): `app.py`

### Recommendation retrieval

- **Saved image features**
- **Image filenames**
- [Nearest-neighbor index](https://github.com/yamuna-pinjala/fashion-recommendation-system/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Upload and display: uploads image (evidence: `app.py`)
- Upload and display → Feature extraction: extracts features (evidence: `app.py`)
- Feature extraction → ResNet50 model: predicts features (evidence: `app.py`)
- Upload and display → Saved image features: loads features (evidence: `app.py`)
- Upload and display → Image filenames: loads filenames (evidence: `app.py`)
- Upload and display → Nearest-neighbor index: fits index (evidence: `app.py`)
- Saved image features → Nearest-neighbor index: provides vectors (evidence: `app.py`)
- Upload and display → Nearest-neighbor index: queries neighbors (evidence: `app.py`)
- Nearest-neighbor index → Upload and display: returns matches (evidence: `app.py`)
- Upload and display → Image filenames: resolves matches (evidence: `app.py`)
- Upload and display → User: displays images (evidence: `app.py`)
