# hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders architecture

> Architecture diagram of the GitHub repository hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders
- Repository: https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders

## Overview

This repository presents a notebook-based video anomaly detection project. Its documented workflow takes video sequences, represents them as 10 resized consecutive frames, reconstructs them with a spatio-temporal autoencoder, and uses reconstruction error to identify potential anomalies. The encoder, latent representation, and decoder are shown as distinct model stages. The README describes these relationships, but no notebook source excerpts were available to verify implementation details such as input handling, error thresholds, or result presentation.

Main entry points: [`Project (1).ipynb`](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb) (Frame Sequences)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sequence["Sequence Preparation"]
  node_frames["Frame Sequences<br/>[Project &#40;1&#41;.ipynb]"]
end

subgraph group_autoencoder["Autoencoder"]
  node_encoder["3D Encoder<br/>[Project &#40;1&#41;.ipynb]"]
  node_latent["Latent Representation<br/>[Project &#40;1&#41;.ipynb]"]
  node_decoder["3D Decoder<br/>[Project &#40;1&#41;.ipynb]"]
end

subgraph group_detection["Anomaly Detection"]
  node_reconstruction["Reconstructed Sequence<br/>[Project &#40;1&#41;.ipynb]"]
  node_error["Reconstruction Error<br/>[Project &#40;1&#41;.ipynb]"]
  node_assessment["Potential Anomaly<br/>[Project &#40;1&#41;.ipynb]"]
end

node_video(("Video Input"))

node_video -->|"forms sequences"| node_frames
node_frames -->|"encodes"| node_encoder
node_encoder -->|"compresses to"| node_latent
node_latent -->|"reconstructs from"| node_decoder
node_decoder -->|"produces"| node_reconstruction
node_frames -->|"compared with"| node_error
node_reconstruction -->|"compared with"| node_error
node_error -->|"indicates"| node_assessment

click node_frames "https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb"
click node_encoder "https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb"
click node_latent "https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb"
click node_decoder "https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb"
click node_reconstruction "https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb"
click node_error "https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb"
click node_assessment "https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).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_frames toneBlue
class node_encoder,node_latent,node_decoder toneAmber
class node_reconstruction,node_error,node_assessment toneMint
class node_video toneIndigo
```

## Components

### Sequence Preparation

- [Frame Sequences](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb): `Project (1).ipynb`

### Autoencoder

- [3D Encoder](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb): `Project (1).ipynb`
- [Latent Representation](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb): `Project (1).ipynb`
- [3D Decoder](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb): `Project (1).ipynb`

### Anomaly Detection

- [Reconstructed Sequence](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb): `Project (1).ipynb`
- [Reconstruction Error](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb): `Project (1).ipynb`
- [Potential Anomaly](https://github.com/hadiaeman/anomaly-detection-in-videos-using-spatio-temporal-autoencoders/blob/main/Project%20(1).ipynb): `Project (1).ipynb`

### Other components

- **Video Input**

## Connections

- Video Input → Frame Sequences: forms sequences
- Frame Sequences → 3D Encoder: encodes
- 3D Encoder → Latent Representation: compresses to
- Latent Representation → 3D Decoder: reconstructs from
- 3D Decoder → Reconstructed Sequence: produces
- Frame Sequences → Reconstruction Error: compared with
- Reconstructed Sequence → Reconstruction Error: compared with
- Reconstruction Error → Potential Anomaly: indicates
