# zable-star/imaging architecture

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

- Interactive diagram: https://gitdiagram.com/zable-star/imaging
- Repository: https://github.com/zable-star/imaging

## Overview

This is an auditable research prototype for simulated laser range-gated imaging, multi-gate 3D-object and rendering-authenticity classification, and conditional cross-domain transfer. The principal workflow constructs gated-image manifests, trains a ModelNet5 source model, transfers compatible weights to military-object folds, and summarizes out-of-fold results. The README documents Blender rendering and formal evaluation; where their implementation files are not in the supplied tree, the graph uses the existing enclosing `scripts/` path. Other capabilities are shown as separate branches; unsampled wiring is omitted.

Main entry points: [`scripts/build_modelnet_multitask_manifest.py`](https://github.com/zable-star/imaging/blob/master/scripts/build_modelnet_multitask_manifest.py) (Multitask manifests), [`scripts/run_multitask_transfer_cv.py`](https://github.com/zable-star/imaging/blob/master/scripts/run_multitask_transfer_cv.py) (Military transfer folds), [`multitask_dataset.py`](https://github.com/zable-star/imaging/blob/master/multitask_dataset.py) (Multitask data loader), [`scripts/run_modelnet_scheme3.py`](https://github.com/zable-star/imaging/blob/master/scripts/run_modelnet_scheme3.py) (ModelNet5 pretraining)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data and Simulation"]
  node_prep["Pair preparation"]
  node_build["Rendering and data build"]
  node_military_data["Military data curation<br/>[generate.py]"]
  node_review["Manual dataset review<br/>[review_dataset.py]"]
  node_manifest["Multitask manifests"]
end

subgraph group_learning["Models and Training"]
  node_multi_data["Multitask data loader"]
  node_modelnet_data["ModelNet manifest loader"]
  node_network["Dual-task network<br/>[multitask_model.py]"]
  node_training["Source training"]
  node_gate_model["Slice attention classifier<br/>[model.py]"]
  node_baseline_train["Baseline training<br/>[train.py]"]
  node_experiment_runner["Experiment runner<br/>[run_experiments.py]"]
end

subgraph group_transfer["Transfer and Evaluation"]
  node_source_run["ModelNet5 pretraining"]
  node_transfer_run["Military transfer folds"]
  node_evaluation["Evaluation protocol"]
  node_formal_summary["Formal results summary"]
  node_results["OOF results and figures"]
end

subgraph group_analysis["Research Analysis"]
  node_detection["Detection prototype<br/>[detection_model.py]"]
  node_gate_audit["Gate dataset diagnostics"]
  node_attention_analysis["Attention analysis"]
  node_sparsity_analysis["Gate sparsity analysis"]
end

node_researcher(("Researcher"))
node_blender(("Blender rendering"))

node_researcher -->|"prepares pairs"| node_prep
node_researcher -->|"curates objects"| node_military_data
node_researcher -->|"requests rendering"| node_build
node_prep -->|"supplies pairs"| node_blender
node_blender -->|"renders gates"| node_build
node_build -->|"provides image data"| node_manifest
node_military_data -->|"reviews candidates"| node_review
node_review -->|"informs selection"| node_manifest
node_manifest -->|"loads samples"| node_multi_data
node_manifest -->|"loads source samples"| node_modelnet_data
node_multi_data -->|"batches samples"| node_training
node_multi_data -->|"batches target folds"| node_transfer_run
node_modelnet_data -->|"loads source data"| node_source_run
node_source_run -->|"runs pretraining"| node_training
node_training -->|"optimizes"| node_network
node_source_run -->|"provides checkpoint"| node_transfer_run
node_transfer_run -->|"trains target tasks"| node_network
node_transfer_run -->|"evaluates folds"| node_evaluation
node_evaluation -->|"supplies metrics"| node_formal_summary
node_formal_summary -->|"summarizes OOF"| node_results
node_researcher -->|"runs baseline"| node_baseline_train
node_baseline_train -->|"trains classifier"| node_gate_model
node_experiment_runner -->|"dispatches runs"| node_baseline_train
node_researcher -->|"configures experiments"| node_experiment_runner
node_researcher -.->|"explores detection"| node_detection
node_researcher -->|"audits gate data"| node_gate_audit
node_researcher -->|"analyzes attention"| node_attention_analysis
node_researcher -->|"analyzes sparsity"| node_sparsity_analysis

click node_prep "https://github.com/zable-star/imaging/blob/master/scripts/prepare_modelnet_scheme3_pairs.py"
click node_build "https://github.com/zable-star/imaging/tree/master/scripts"
click node_military_data "https://github.com/zable-star/imaging/blob/master/dataset_new/generate.py"
click node_review "https://github.com/zable-star/imaging/blob/master/dataset_new/review_dataset.py"
click node_manifest "https://github.com/zable-star/imaging/blob/master/scripts/build_modelnet_multitask_manifest.py"
click node_multi_data "https://github.com/zable-star/imaging/blob/master/multitask_dataset.py"
click node_modelnet_data "https://github.com/zable-star/imaging/blob/master/modelnet_manifest_dataset.py"
click node_network "https://github.com/zable-star/imaging/blob/master/multitask_model.py"
click node_training "https://github.com/zable-star/imaging/blob/master/scripts/train_multitask_manifest.py"
click node_source_run "https://github.com/zable-star/imaging/blob/master/scripts/run_modelnet_scheme3.py"
click node_transfer_run "https://github.com/zable-star/imaging/blob/master/scripts/run_multitask_transfer_cv.py"
click node_evaluation "https://github.com/zable-star/imaging/blob/master/evaluation_protocol.py"
click node_formal_summary "https://github.com/zable-star/imaging/blob/master/scripts/summarize_triangle_transfer_formal.py"
click node_gate_model "https://github.com/zable-star/imaging/blob/master/model.py"
click node_baseline_train "https://github.com/zable-star/imaging/blob/master/train.py"
click node_experiment_runner "https://github.com/zable-star/imaging/blob/master/run_experiments.py"
click node_detection "https://github.com/zable-star/imaging/blob/master/detection_model.py"
click node_gate_audit "https://github.com/zable-star/imaging/blob/master/dataset_new/diagnose_gate_stack.py"
click node_attention_analysis "https://github.com/zable-star/imaging/blob/master/analyze_attention_scores.py"
click node_sparsity_analysis "https://github.com/zable-star/imaging/blob/master/analyze_gate_sparsity.py"
click node_results "https://github.com/zable-star/imaging/tree/master/scripts"

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_prep,node_build,node_military_data,node_review,node_manifest toneBlue
class node_multi_data,node_modelnet_data,node_network,node_training,node_gate_model,node_baseline_train,node_experiment_runner toneAmber
class node_source_run,node_transfer_run,node_evaluation,node_formal_summary,node_results toneMint
class node_detection,node_gate_audit,node_attention_analysis,node_sparsity_analysis toneRose
class node_researcher,node_blender toneIndigo
```

## Components

### Data and Simulation

- [Pair preparation](https://github.com/zable-star/imaging/blob/master/scripts/prepare_modelnet_scheme3_pairs.py): `scripts/prepare_modelnet_scheme3_pairs.py`
- [Rendering and data build](https://github.com/zable-star/imaging/tree/master/scripts): `scripts`
- [Military data curation](https://github.com/zable-star/imaging/blob/master/dataset_new/generate.py): `dataset_new/generate.py`
- [Manual dataset review](https://github.com/zable-star/imaging/blob/master/dataset_new/review_dataset.py): `dataset_new/review_dataset.py`
- [Multitask manifests](https://github.com/zable-star/imaging/blob/master/scripts/build_modelnet_multitask_manifest.py): `scripts/build_modelnet_multitask_manifest.py`

### Models and Training

- [Multitask data loader](https://github.com/zable-star/imaging/blob/master/multitask_dataset.py): `multitask_dataset.py`
- [ModelNet manifest loader](https://github.com/zable-star/imaging/blob/master/modelnet_manifest_dataset.py): `modelnet_manifest_dataset.py`
- [Dual-task network](https://github.com/zable-star/imaging/blob/master/multitask_model.py): `multitask_model.py`
- [Source training](https://github.com/zable-star/imaging/blob/master/scripts/train_multitask_manifest.py): `scripts/train_multitask_manifest.py`
- [Slice attention classifier](https://github.com/zable-star/imaging/blob/master/model.py): `model.py`
- [Baseline training](https://github.com/zable-star/imaging/blob/master/train.py): `train.py`
- [Experiment runner](https://github.com/zable-star/imaging/blob/master/run_experiments.py): `run_experiments.py`

### Transfer and Evaluation

- [ModelNet5 pretraining](https://github.com/zable-star/imaging/blob/master/scripts/run_modelnet_scheme3.py): `scripts/run_modelnet_scheme3.py`
- [Military transfer folds](https://github.com/zable-star/imaging/blob/master/scripts/run_multitask_transfer_cv.py): `scripts/run_multitask_transfer_cv.py`
- [Evaluation protocol](https://github.com/zable-star/imaging/blob/master/evaluation_protocol.py): `evaluation_protocol.py`
- [Formal results summary](https://github.com/zable-star/imaging/blob/master/scripts/summarize_triangle_transfer_formal.py): `scripts/summarize_triangle_transfer_formal.py`
- [OOF results and figures](https://github.com/zable-star/imaging/tree/master/scripts): `scripts`

### Research Analysis

- [Detection prototype](https://github.com/zable-star/imaging/blob/master/detection_model.py): `detection_model.py`
- [Gate dataset diagnostics](https://github.com/zable-star/imaging/blob/master/dataset_new/diagnose_gate_stack.py): `dataset_new/diagnose_gate_stack.py`
- [Attention analysis](https://github.com/zable-star/imaging/blob/master/analyze_attention_scores.py): `analyze_attention_scores.py`
- [Gate sparsity analysis](https://github.com/zable-star/imaging/blob/master/analyze_gate_sparsity.py): `analyze_gate_sparsity.py`

### Other components

- **Researcher**
- **Blender rendering**

## Connections

- Researcher → Pair preparation: prepares pairs
- Researcher → Military data curation: curates objects
- Researcher → Rendering and data build: requests rendering
- Pair preparation → Blender rendering: supplies pairs
- Blender rendering → Rendering and data build: renders gates
- Rendering and data build → Multitask manifests: provides image data
- Military data curation → Manual dataset review: reviews candidates
- Manual dataset review → Multitask manifests: informs selection
- Multitask manifests → Multitask data loader: loads samples
- Multitask manifests → ModelNet manifest loader: loads source samples
- Multitask data loader → Source training: batches samples
- Multitask data loader → Military transfer folds: batches target folds
- ModelNet manifest loader → ModelNet5 pretraining: loads source data
- ModelNet5 pretraining → Source training: runs pretraining
- Source training → Dual-task network: optimizes
- ModelNet5 pretraining → Military transfer folds: provides checkpoint
- Military transfer folds → Dual-task network: trains target tasks
- Military transfer folds → Evaluation protocol: evaluates folds
- Evaluation protocol → Formal results summary: supplies metrics
- Formal results summary → OOF results and figures: summarizes OOF
- Researcher → Baseline training: runs baseline
- Baseline training → Slice attention classifier: trains classifier
- Experiment runner → Baseline training: dispatches runs
- Researcher → Experiment runner: configures experiments
- Researcher → Detection prototype: explores detection
- Researcher → Gate dataset diagnostics: audits gate data
- Researcher → Attention analysis: analyzes attention
- Researcher → Gate sparsity analysis: analyzes sparsity
