# shayanali005/facial-expression-cnn-resnet50- architecture

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

- Interactive diagram: https://gitdiagram.com/shayanali005/facial-expression-cnn-resnet50-
- Repository: https://github.com/shayanali005/facial-expression-cnn-resnet50-

## Overview

This repository presents a notebook-based facial-expression classifier: grayscale images are normalized, passed through a CNN, and evaluated across seven emotion classes. The README documents preprocessing, the model blueprint, batch training with Adam, and accuracy/loss and confusion-matrix diagnostics. The notebook is the only listed executable artifact, but its source was not provided, so the graph reflects documented capabilities rather than verified call structure.

Main entry points: [`Facial_expression.ipynb`](https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb) (Image preprocessing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_preparation["Image preparation"]
  node_preprocessing["Image preprocessing"]
end

subgraph group_modeling["Model and training"]
  node_cnn["CNN classifier"]
  node_training["Model training"]
end

subgraph group_evaluation["Evaluation"]
  node_evaluation["Performance metrics"]
  node_confusion["Confusion matrix"]
end

node_analyst(("Analyst"))
node_facial_images["Facial images"]

node_analyst -->|"runs"| node_preprocessing
node_facial_images -->|"provides images"| node_preprocessing
node_preprocessing -->|"feeds normalized images"| node_cnn
node_cnn -->|"trains model"| node_training
node_training -->|"evaluates model"| node_evaluation
node_evaluation -->|"summarizes errors"| node_confusion

click node_preprocessing "https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb"
click node_cnn "https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb"
click node_training "https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb"
click node_evaluation "https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb"
click node_confusion "https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb"

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_preprocessing toneBlue
class node_cnn,node_training toneAmber
class node_evaluation,node_confusion toneMint
class node_analyst,node_facial_images toneIndigo
```

## Components

### Image preparation

- [Image preprocessing](https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb): `Facial_expression.ipynb`

### Model and training

- [CNN classifier](https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb): `Facial_expression.ipynb`
- [Model training](https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb): `Facial_expression.ipynb`

### Evaluation

- [Performance metrics](https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb): `Facial_expression.ipynb`
- [Confusion matrix](https://github.com/shayanali005/facial-expression-cnn-resnet50-/blob/main/Facial_expression.ipynb): `Facial_expression.ipynb`

### Other components

- **Analyst**
- **Facial images**

## Connections

- Analyst → Image preprocessing: runs
- Facial images → Image preprocessing: provides images
- Image preprocessing → CNN classifier: feeds normalized images
- CNN classifier → Model training: trains model
- Model training → Performance metrics: evaluates model
- Performance metrics → Confusion matrix: summarizes errors
