# smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders architecture

> Architecture diagram of the GitHub repository smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders
- Repository: https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders

## Overview

This repository delivers satellite-image novelty detection through a PyTorch model, a FastAPI service, a Streamlit upload UI, and a React dashboard. The main user path is dashboard upload → API inference → reconstruction/error score and visualizations, with optional threshold override and browser-saved scan summaries. Separate offline stages prepare data, train/calibrate the autoencoder, and evaluate it. The graph preserves the landing and login routes as distinct frontend capabilities. Source excerpts establish most runtime calls; the README documents the HTTP integration, while unsampled evaluation and login internals are represented conservatively.

Main entry points: [`satellite_anomaly_detection/src/detect.py`](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/detect.py) (Anomaly detector), [`frontend/src/App.tsx`](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/App.tsx) (App routing), [`frontend/src/pages/Dashboard.tsx`](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Dashboard.tsx) (Scan dashboard), [`satellite_anomaly_detection/src/train.py`](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/train.py) (Training and calibration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React application"]
  node_app_routes["App routing<br/>[App.tsx]"]
  node_landing["Landing experience<br/>[Landing.tsx]"]
  node_landing_sections["Landing sections"]
  node_login["Login<br/>[Login.tsx]"]
  node_dashboard["Scan dashboard<br/>[Dashboard.tsx]"]
  node_dropzone["Image dropzone<br/>[ImageDropzone.tsx]"]
  node_browser_history[("Browser scan history<br/>[Dashboard.tsx]")]
end

subgraph group_inference["Inference interfaces"]
  node_api["FastAPI service<br/>[api.py]"]
  node_streamlit["Streamlit uploader<br/>[app.py]"]
  node_detector["Anomaly detector<br/>[detect.py]"]
  node_checkpoint[("Calibrated checkpoint")]
end

subgraph group_modeling["Model lifecycle"]
  node_dataset["Dataset partitions<br/>[dataset.py]"]
  node_autoencoder["Autoencoder architectures<br/>[model.py]"]
  node_training["Training and calibration<br/>[train.py]"]
  node_evaluation["Held-out evaluation<br/>[evaluate.py]"]
  node_report["Evaluation reporting<br/>[report.py]"]
end

node_visitor(("Visitor"))
node_user(("Dashboard user"))

node_visitor -->|"opens app"| node_app_routes
node_app_routes -->|"routes to"| node_landing
node_app_routes -->|"routes to"| node_login
node_app_routes -->|"protects route"| node_dashboard
node_landing -->|"renders"| node_landing_sections
node_user -->|"selects image"| node_dropzone
node_dropzone -->|"passes file"| node_dashboard
node_dashboard -->|"requests inference"| node_api
node_api -->|"invokes prediction"| node_detector
node_streamlit -->|"invokes prediction"| node_detector
node_detector -->|"reconstructs images"| node_autoencoder
node_detector -->|"loads weights"| node_checkpoint
node_detector -->|"uses transform"| node_dataset
node_dashboard -->|"stores summaries"| node_browser_history
node_training -->|"loads partitions"| node_dataset
node_training -->|"trains architecture"| node_autoencoder
node_training -->|"writes calibrated model"| node_checkpoint
node_evaluation -->|"loads partitions"| node_dataset
node_evaluation -->|"scores images"| node_detector
node_report -->|"uses predictions"| node_detector

click node_app_routes "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/App.tsx"
click node_landing "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Landing.tsx"
click node_landing_sections "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/tree/main/frontend/src/components/landing"
click node_login "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Login.tsx"
click node_dashboard "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Dashboard.tsx"
click node_dropzone "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/components/dashboard/ImageDropzone.tsx"
click node_browser_history "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Dashboard.tsx"
click node_api "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/api.py"
click node_streamlit "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/app.py"
click node_detector "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/detect.py"
click node_checkpoint "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/models/best_autoencoder.pth"
click node_dataset "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/dataset.py"
click node_autoencoder "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/model.py"
click node_training "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/train.py"
click node_evaluation "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/evaluate.py"
click node_report "https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/report.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_app_routes,node_landing,node_landing_sections,node_login,node_dashboard,node_dropzone,node_browser_history,node_user toneBlue
class node_api,node_streamlit,node_detector,node_checkpoint toneAmber
class node_dataset,node_autoencoder,node_training,node_evaluation,node_report toneMint
class node_visitor toneIndigo
```

## Components

### React application

- [App routing](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Landing experience](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Landing.tsx): `frontend/src/pages/Landing.tsx`
- [Landing sections](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/tree/main/frontend/src/components/landing): `frontend/src/components/landing`
- [Login](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Login.tsx): `frontend/src/pages/Login.tsx`
- [Scan dashboard](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`
- [Image dropzone](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/components/dashboard/ImageDropzone.tsx): `frontend/src/components/dashboard/ImageDropzone.tsx`
- [Browser scan history](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`

### Inference interfaces

- [FastAPI service](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/api.py): `satellite_anomaly_detection/api.py`
- [Streamlit uploader](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/app.py): `satellite_anomaly_detection/app.py`
- [Anomaly detector](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/detect.py): `satellite_anomaly_detection/src/detect.py`
- [Calibrated checkpoint](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/models/best_autoencoder.pth): `satellite_anomaly_detection/models/best_autoencoder.pth`

### Model lifecycle

- [Dataset partitions](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/dataset.py): `satellite_anomaly_detection/src/dataset.py`
- [Autoencoder architectures](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/model.py): `satellite_anomaly_detection/src/model.py`
- [Training and calibration](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/train.py): `satellite_anomaly_detection/src/train.py`
- [Held-out evaluation](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/evaluate.py): `satellite_anomaly_detection/src/evaluate.py`
- [Evaluation reporting](https://github.com/smrutiparhi/satellite-anomaly-detection-using-convolutional-autoencoders/blob/main/satellite_anomaly_detection/src/report.py): `satellite_anomaly_detection/src/report.py`

### Other components

- **Visitor**
- **Dashboard user**

## Connections

- Visitor → App routing: opens app (evidence: `frontend/src/App.tsx`)
- App routing → Landing experience: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Login: routes to (evidence: `frontend/src/App.tsx`)
- App routing → Scan dashboard: protects route (evidence: `frontend/src/App.tsx`)
- Landing experience → Landing sections: renders (evidence: `frontend/src/pages/Landing.tsx`)
- Dashboard user → Image dropzone: selects image (evidence: `frontend/src/components/dashboard/ImageDropzone.tsx`)
- Image dropzone → Scan dashboard: passes file (evidence: `frontend/src/pages/Dashboard.tsx`)
- Scan dashboard → FastAPI service: requests inference (evidence: `README.md`)
- FastAPI service → Anomaly detector: invokes prediction (evidence: `satellite_anomaly_detection/api.py`)
- Streamlit uploader → Anomaly detector: invokes prediction (evidence: `satellite_anomaly_detection/app.py`)
- Anomaly detector → Autoencoder architectures: reconstructs images (evidence: `satellite_anomaly_detection/src/detect.py`)
- Anomaly detector → Calibrated checkpoint: loads weights (evidence: `satellite_anomaly_detection/src/detect.py`)
- Anomaly detector → Dataset partitions: uses transform (evidence: `satellite_anomaly_detection/src/detect.py`)
- Scan dashboard → Browser scan history: stores summaries (evidence: `README.md`)
- Training and calibration → Dataset partitions: loads partitions (evidence: `satellite_anomaly_detection/src/train.py`)
- Training and calibration → Autoencoder architectures: trains architecture (evidence: `satellite_anomaly_detection/src/train.py`)
- Training and calibration → Calibrated checkpoint: writes calibrated model (evidence: `satellite_anomaly_detection/src/train.py`)
- Held-out evaluation → Dataset partitions: loads partitions (evidence: `satellite_anomaly_detection/src/evaluate.py`)
- Held-out evaluation → Anomaly detector: scores images (evidence: `satellite_anomaly_detection/src/evaluate.py`)
- Evaluation reporting → Anomaly detector: uses predictions (evidence: `satellite_anomaly_detection/src/report.py`)
