# abhishekanand19/machine-larning-project-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/abhishekanand19/machine-larning-project-2026
- Repository: https://github.com/abhishekanand19/machine-larning-project-2026

## Overview

Formation Flying is a synthetic-data machine-learning demo for estimating a follower aircraft’s relative pose from camera keypoints. The main user workflow is to choose a pose or held-out sample, obtain 42 camera features, run saved-model inference, and inspect the estimate and performance. The graph also covers dataset generation, validation, preprocessing, and training. Source excerpts support the main calls; unsampled app branches and README documentation provide no additional evidence.

Main entry points: [`app.py`](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/app.py) (Streamlit app), [`src/preprocessing.py`](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/preprocessing.py) (Splits and scaling), [`src/predict.py`](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/predict.py) (Pose predictor), [`src/generate_dataset.py`](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/generate_dataset.py) (Dataset generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Interactive Demo"]
  node_app["Streamlit app<br/>[app.py]"]
  node_controls["Pose controls<br/>[demo_controls.py]"]
  node_visuals["Pose and camera views<br/>[demo_visuals.py]"]
end

subgraph group_simulation["Synthetic Observations"]
  node_simulator["Camera simulation<br/>[utils.py]"]
  node_generator["Dataset generator"]
  node_validator["Dataset validation"]
end

subgraph group_ml["Model Pipeline"]
  node_preprocessing["Splits and scaling<br/>[preprocessing.py]"]
  node_trainer["ANN training<br/>[train.py]"]
  node_model["Pose ANN<br/>[model.py]"]
  node_predictor["Pose predictor<br/>[predict.py]"]
  node_evaluation["Held-out evaluation<br/>[evaluate.py]"]
end

subgraph group_artifacts["Data and Artifacts"]
  node_dataset[("Synthetic observations")]
  node_splits["Split indices and metadata<br/>[split_indices.npz]"]
  node_scaler["Target scaler"]
  node_checkpoint["Saved ANN checkpoint<br/>[best_model.pt]"]
end

node_user(("Demo user"))

node_user -->|"uses"| node_app
node_app -->|"uses presets"| node_controls
node_app -->|"simulates pose"| node_simulator
node_app -->|"requests prediction"| node_predictor
node_app -->|"loads splits"| node_preprocessing
node_app -->|"scores predictions"| node_evaluation
node_app -->|"renders views"| node_visuals
node_visuals -->|"formats pose labels"| node_controls
node_visuals -->|"projects truth overlay"| node_simulator
node_generator -->|"observes poses"| node_simulator
node_generator -->|"validates generated data"| node_validator
node_generator -->|"writes observations"| node_dataset
node_validator -->|"validates schema"| node_dataset
node_preprocessing -->|"reads observations"| node_dataset
node_preprocessing -->|"writes split indices"| node_splits
node_preprocessing -->|"fits and saves"| node_scaler
node_trainer -->|"prepares data"| node_preprocessing
node_trainer -->|"trains"| node_model
node_trainer -->|"saves best weights"| node_checkpoint
node_predictor -->|"runs inference"| node_model
node_predictor -->|"loads inverse transform"| node_scaler
node_predictor -->|"loads weights"| node_checkpoint
node_predictor -->|"checks dataset hash"| node_preprocessing
node_evaluation -->|"loads held-out split"| node_preprocessing
node_evaluation -->|"predicts test rows"| node_predictor

click node_app "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/app.py"
click node_controls "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/demo_controls.py"
click node_visuals "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/demo_visuals.py"
click node_simulator "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/utils.py"
click node_generator "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/generate_dataset.py"
click node_validator "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/validate_dataset.py"
click node_preprocessing "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/preprocessing.py"
click node_trainer "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/train.py"
click node_model "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/model.py"
click node_predictor "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/predict.py"
click node_evaluation "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/evaluate.py"
click node_dataset "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/data/raw/formation_flying_synthetic.csv"
click node_splits "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/data/processed/split_indices.npz"
click node_scaler "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/models/target_scaler.joblib"
click node_checkpoint "https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/models/best_model.pt"

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,node_controls,node_visuals,node_user toneBlue
class node_simulator,node_generator,node_validator toneAmber
class node_preprocessing,node_trainer,node_model,node_predictor,node_evaluation toneMint
class node_dataset,node_splits,node_scaler,node_checkpoint toneRose
```

## Components

### Interactive Demo

- [Streamlit app](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/app.py): `app.py`
- [Pose controls](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/demo_controls.py): `src/demo_controls.py`
- [Pose and camera views](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/demo_visuals.py): `src/demo_visuals.py`

### Synthetic Observations

- [Camera simulation](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/utils.py): `src/utils.py`
- [Dataset generator](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/generate_dataset.py): `src/generate_dataset.py`
- [Dataset validation](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/validate_dataset.py): `src/validate_dataset.py`

### Model Pipeline

- [Splits and scaling](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/preprocessing.py): `src/preprocessing.py`
- [ANN training](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/train.py): `src/train.py`
- [Pose ANN](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/model.py): `src/model.py`
- [Pose predictor](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/predict.py): `src/predict.py`
- [Held-out evaluation](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/src/evaluate.py): `src/evaluate.py`

### Data and Artifacts

- [Synthetic observations](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/data/raw/formation_flying_synthetic.csv): `data/raw/formation_flying_synthetic.csv`
- [Split indices and metadata](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/data/processed/split_indices.npz): `data/processed/split_indices.npz`
- [Target scaler](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/models/target_scaler.joblib): `models/target_scaler.joblib`
- [Saved ANN checkpoint](https://github.com/abhishekanand19/machine-larning-project-2026/blob/main/models/best_model.pt): `models/best_model.pt`

### Other components

- **Demo user**

## Connections

- Demo user → Streamlit app: uses (evidence: `app.py`)
- Streamlit app → Pose controls: uses presets (evidence: `app.py`)
- Streamlit app → Camera simulation: simulates pose (evidence: `app.py`)
- Streamlit app → Pose predictor: requests prediction (evidence: `app.py`)
- Streamlit app → Splits and scaling: loads splits (evidence: `app.py`)
- Streamlit app → Held-out evaluation: scores predictions (evidence: `app.py`)
- Streamlit app → Pose and camera views: renders views (evidence: `app.py`)
- Pose and camera views → Pose controls: formats pose labels (evidence: `src/demo_visuals.py`)
- Pose and camera views → Camera simulation: projects truth overlay (evidence: `src/demo_visuals.py`)
- Dataset generator → Camera simulation: observes poses (evidence: `src/generate_dataset.py`)
- Dataset generator → Dataset validation: validates generated data (evidence: `src/generate_dataset.py`)
- Dataset generator → Synthetic observations: writes observations (evidence: `src/generate_dataset.py`)
- Dataset validation → Synthetic observations: validates schema (evidence: `src/validate_dataset.py`)
- Splits and scaling → Synthetic observations: reads observations (evidence: `src/preprocessing.py`)
- Splits and scaling → Split indices and metadata: writes split indices (evidence: `src/preprocessing.py`)
- Splits and scaling → Target scaler: fits and saves (evidence: `src/preprocessing.py`)
- ANN training → Splits and scaling: prepares data (evidence: `src/train.py`)
- ANN training → Pose ANN: trains (evidence: `src/train.py`)
- ANN training → Saved ANN checkpoint: saves best weights (evidence: `src/train.py`)
- Pose predictor → Pose ANN: runs inference (evidence: `src/predict.py`)
- Pose predictor → Target scaler: loads inverse transform (evidence: `src/predict.py`)
- Pose predictor → Saved ANN checkpoint: loads weights (evidence: `src/predict.py`)
- Pose predictor → Splits and scaling: checks dataset hash (evidence: `src/predict.py`)
- Held-out evaluation → Splits and scaling: loads held-out split (evidence: `src/evaluate.py`)
- Held-out evaluation → Pose predictor: predicts test rows (evidence: `src/evaluate.py`)
