# raiyan22/waste architecture

> Architecture diagram of the GitHub repository raiyan22/waste, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/raiyan22/waste
- Repository: https://github.com/raiyan22/waste

## Overview

This repository is a research workspace, not a conventional application codebase. Its center of gravity is a NuScenes-based pedestrian intent prediction project: a hybrid PyTorch model that fuses trajectory history with environmental context such as weather and time-of-day.

1. Core research objective
The README describes the main architecture: an LSTM branch for temporal pedestrian kinematics, a separate context encoder for scene metadata, and a feature-level fusion stage for intent classification. The intended output has evolved from binary intent to multiclass behavior labels.

2. Main data boundary
The dataset boundary is external and important: NuScenes v1.0-mini is expected to live in Google Drive, then be mounted in Colab, unzipped locally, and read through `nuscenes-devkit`. That means the runtime architecture is “Drive storage -> Colab local runtime -> dataset parser -> PyTorch tensors.”

3. Model pipeline
The ML pipeline implied by the README is:
NuScenes raw annotations -> pedestrian trajectory extraction -> context feature extraction -> fused latent representation -> classification head.
This is the only clearly defined computation path in the repo.

4. Experiment progression
The project appears to be staged in two phases: first synthetic-data validation, then real-data training on NuScenes. That suggests the notebook is likely the execution layer for proving the architecture works before full dataset integration.

5. Notebook as execution surface
`Untitled0.ipynb` is likely the main interactive development artifact. In this repo, the notebook is probably where data loading, model definition, training, and debugging happen, while the text files serve as companion notes.

6. Research/process documentation layer
Several `.md` files (`copy-repo-remote.md`, `docker-cmds.md`, `gulli-trivy.md`, `kyc.md`, `notif-slk.md`, `oss-ollama-claudecode.md`, `prank.md`) look like operational notes, prompts, or auxiliary experiments rather than part of the model itself. They form a “workflow/documentation” layer around the research project.

7. Prompt and text artifacts
Files like `prompt`, `try-deep.txt`, and `stat.txt` suggest prompt engineering, experiment notes, or status tracking. These are supporting artifacts that help reproduce or communicate the research, but they are not the core inference path.

8. HTML/JS side artifacts
`abcd.html`, `chatpa.html`, `lio.html`, and `paste-notif.html`, plus `chat-data.js`, look like standalone browser experiments or small UI snippets. They are isolated from the NuScenes model architecture and should be treated as a separate sidecar layer, not part of the ML pipeline.

9. Binary/archive assets
`humanize.zip` is a packaged asset bundle, likely unrelated to the primary model flow unless explicitly unpacked into a demo or prompt-related workflow. Its presence reinforces that this repo is a mixed artifact store, not a single-purpose source tree.

10. Repository boundaries to show in an architecture diagram
A correct diagram would show:
- External sources: NuScenes download site, Google Drive, Colab
- Execution layer: notebook-based PyTorch training
- Data layer: raw NuScenes annotations and local extracted samples
- Model layer: LSTM + context encoder + fusion classifier
- Support layer: markdown notes, prompts, HTML/JS experiments, and archives
The important architectural point is that the repository is organized around research preparation and experimentation, with the actual model pipeline living primarily in the notebook and README-defined workflow.

Main entry points: [`Untitled0.ipynb`](https://github.com/raiyan22/waste/blob/main/Untitled0.ipynb) (Training loop), [`prompt`](https://github.com/raiyan22/waste/tree/main/prompt) (Prompt notes), [`README.md`](https://github.com/raiyan22/waste/blob/main/README.md) (README spec), [`copy-repo-remote.md`](https://github.com/raiyan22/waste/blob/main/copy-repo-remote.md) (Ops notes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_external["External sources"]
  node_nuscenes_data[("NuScenes data<br/>dataset source")]
  node_google_drive[("Google Drive<br/>storage")]
  node_colab_runtime["Colab runtime<br/>notebook runtime"]
end

subgraph group_core["Core research"]
  node_devkit["NuScenes devkit<br/>dataset parser"]
  node_traj_extract["Traj extract<br/>data prep"]
  node_context_extract["Context extract<br/>feature prep"]
  node_lstm_branch["LSTM branch<br/>temporal encoder"]
  node_context_encoder["Context encoder<br/>metadata encoder"]
  node_fusion_layer["Fusion stage<br/>feature fusion"]
  node_classifier["Classifier<br/>intent head"]
  node_training_loop["Training loop<br/>pytorch training<br/>[Untitled0.ipynb]"]
end

subgraph group_support["Support artifacts"]
  node_readme_spec["README spec<br/>architecture note<br/>[README.md]"]
  node_ops_notes["Ops notes<br/>workflow docs"]
  node_prompt_artifacts["Prompt notes<br/>text artifacts"]
  node_status_text["Status text<br/>text notes<br/>[stat.txt]"]
  node_archive_bundle[("Archive bundle<br/>asset archive<br/>[humanize.zip]")]
end

subgraph group_sidecar["Sidecar experiments"]
  node_html_snippets["HTML snippets<br/>browser experiments<br/>[abcd.html]"]
  node_chat_script["Chat script<br/>browser script<br/>[chat-data.js]"]
end

node_google_drive -->|"stores"| node_nuscenes_data
node_colab_runtime -->|"loads"| node_devkit
node_nuscenes_data -->|"parsed by"| node_devkit
node_devkit -->|"feeds"| node_traj_extract
node_devkit -->|"feeds"| node_context_extract
node_traj_extract -->|"input"| node_lstm_branch
node_context_extract -->|"input"| node_context_encoder
node_lstm_branch -->|"embeddings"| node_fusion_layer
node_context_encoder -->|"embeddings"| node_fusion_layer
node_fusion_layer -->|"latent"| node_classifier
node_training_loop -->|"trains"| node_lstm_branch
node_training_loop -->|"trains"| node_context_encoder
node_training_loop -->|"orchestrates"| node_fusion_layer
node_training_loop -->|"optimizes"| node_classifier
node_readme_spec -.->|"describes"| node_training_loop
node_ops_notes -.->|"supports"| node_training_loop
node_prompt_artifacts -.->|"supports"| node_training_loop
node_status_text -.->|"tracks"| node_training_loop
node_html_snippets -->|"uses"| node_chat_script
node_archive_bundle -.->|"bundles"| node_prompt_artifacts

click node_training_loop "https://github.com/raiyan22/waste/blob/main/Untitled0.ipynb"
click node_readme_spec "https://github.com/raiyan22/waste/blob/main/README.md"
click node_ops_notes "https://github.com/raiyan22/waste/blob/main/copy-repo-remote.md"
click node_prompt_artifacts "https://github.com/raiyan22/waste/tree/main/prompt"
click node_status_text "https://github.com/raiyan22/waste/blob/main/stat.txt"
click node_html_snippets "https://github.com/raiyan22/waste/blob/main/abcd.html"
click node_chat_script "https://github.com/raiyan22/waste/blob/main/chat-data.js"
click node_archive_bundle "https://github.com/raiyan22/waste/blob/main/humanize.zip"

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_nuscenes_data,node_google_drive,node_colab_runtime toneBlue
class node_devkit,node_traj_extract,node_context_extract,node_lstm_branch,node_context_encoder,node_fusion_layer,node_classifier,node_training_loop toneAmber
class node_readme_spec,node_ops_notes,node_prompt_artifacts,node_status_text,node_archive_bundle toneMint
class node_html_snippets,node_chat_script toneRose
```

## Components

### External sources

Off-repo inputs and runtime services used by the research workflow.

- **NuScenes data**: dataset source · External NuScenes v1.0-mini annotations and scenes.
- **Google Drive**: storage · Expected remote storage for the dataset bundle.
- **Colab runtime**: notebook runtime · Execution environment where data is mounted and training runs.

### Core research

Notebook-centered ML pipeline for pedestrian intent prediction.

- **NuScenes devkit**: dataset parser · Library used to read and structure NuScenes data.
- **Traj extract**: data prep · Builds pedestrian trajectory histories from raw annotations.
- **Context extract**: feature prep · Derives weather, time-of-day, and other scene context features.
- **LSTM branch**: temporal encoder · Encodes pedestrian kinematics over time.
- **Context encoder**: metadata encoder · Encodes environmental and scene metadata.
- **Fusion stage**: feature fusion · Combines temporal and context embeddings.
- **Classifier**: intent head · Predicts binary or multiclass pedestrian intent labels.
- [Training loop](https://github.com/raiyan22/waste/blob/main/Untitled0.ipynb): pytorch training · Notebook-driven optimization, validation, and debugging. · `Untitled0.ipynb`

### Support artifacts

Notes, prompts, and operational documents around the project.

- [README spec](https://github.com/raiyan22/waste/blob/main/README.md): architecture note · Defines the intended model design and workflow. · `README.md`
- [Ops notes](https://github.com/raiyan22/waste/blob/main/copy-repo-remote.md): workflow docs · Repository coordination and environment notes. · `copy-repo-remote.md`
- [Prompt notes](https://github.com/raiyan22/waste/tree/main/prompt): text artifacts · Prompting, status, and experiment notes. · `prompt`
- [Status text](https://github.com/raiyan22/waste/blob/main/stat.txt): text notes · Loose experiment or progress tracking text. · `stat.txt`
- [Archive bundle](https://github.com/raiyan22/waste/blob/main/humanize.zip): asset archive · Packaged assets or demo content. · `humanize.zip`

### Sidecar experiments

Standalone browser/UI artifacts kept alongside the research work.

- [HTML snippets](https://github.com/raiyan22/waste/blob/main/abcd.html): browser experiments · Standalone browser-side UI or interaction experiments. · `abcd.html`
- [Chat script](https://github.com/raiyan22/waste/blob/main/chat-data.js): browser script · Client-side data or interaction helper. · `chat-data.js`

## Connections

- Google Drive → NuScenes data: stores · Dataset is kept in Drive before use.
- Colab runtime → NuScenes devkit: loads · Notebook runtime imports the dataset parser.
- NuScenes data → NuScenes devkit: parsed by · Raw scenes and annotations are read through the devkit.
- NuScenes devkit → Traj extract: feeds · Parsed annotations are turned into trajectory samples.
- NuScenes devkit → Context extract: feeds · Scene records supply contextual features.
- Traj extract → LSTM branch: input · Trajectory histories are encoded temporally.
- Context extract → Context encoder: input · Context features are encoded separately.
- LSTM branch → Fusion stage: embeddings · Temporal representation enters fusion.
- Context encoder → Fusion stage: embeddings · Context representation enters fusion.
- Fusion stage → Classifier: latent · Fused features drive intent classification.
- Training loop → LSTM branch: trains · Notebook defines and trains the temporal branch.
- Training loop → Context encoder: trains · Notebook defines and trains the context branch.
- Training loop → Fusion stage: orchestrates · Notebook coordinates feature fusion.
- Training loop → Classifier: optimizes · Notebook runs the prediction head and loss.
- README spec → Training loop: describes · README documents the intended workflow executed in the notebook.
- Ops notes → Training loop: supports · Operational notes support setup and execution.
- Prompt notes → Training loop: supports · Prompt and experiment text supplements the workflow.
- Status text → Training loop: tracks · Status notes reflect experiment progress.
- HTML snippets → Chat script: uses · Browser snippets pair with client-side script artifacts.
- Archive bundle → Prompt notes: bundles · Packaged assets may accompany notes or prompts.
