# souravguha09/as-hmm-bo architecture

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

- Interactive diagram: https://gitdiagram.com/souravguha09/as-hmm-bo
- Repository: https://github.com/souravguha09/as-hmm-bo

## Overview

AS-HMM-BO is a research workflow for optimizing deep-learning gland segmentation. The documented path runs from GlaS data inspection and preparation through U-Net evaluation, optimization-feedback estimation, HMM-guided candidate search, and controlled comparisons and final testing. The README identifies the research notebook as the implementation, but its source was not provided here; the graph therefore represents documented capabilities and cites the README for those relationships, not inspected notebook calls.

Main entry points: [`notebooks/AS-HMM-BO_Research.ipynb`](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb) (Patient-aware splits), [`data/raw`](https://github.com/souravguha09/as-hmm-bo/tree/main/data/raw) (GlaS dataset), [`outputs`](https://github.com/souravguha09/as-hmm-bo/tree/main/outputs) (Experiment outputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_prep["Data preparation"]
  node_glas["GlaS dataset"]
  node_audit["Dataset audit"]
  node_preprocessing["Mask preprocessing"]
  node_splits["Patient-aware splits"]
end

subgraph group_segmentation["Segmentation evaluation"]
  node_unet["U-Net training"]
  node_evaluation["Model evaluation"]
end

subgraph group_optimization["Adaptive optimization"]
  node_feedback["Optimization feedback"]
  node_hmm["HMM state estimate"]
  node_bayes["Bayesian optimization"]
  node_adaptive["Adaptive candidate policy"]
  node_budget["Budgeted trials"]
end

subgraph group_experiments["Experiment analysis"]
  node_comparisons["Optimizer comparisons"]
  node_ablations["Ablation analysis"]
  node_final_test["Independent test"]
  node_outputs["Experiment outputs"]
end

node_researcher(("Researcher"))

node_researcher -->|"provides data"| node_glas
node_glas -->|"audits pairs"| node_audit
node_audit -->|"prepares masks"| node_preprocessing
node_preprocessing -->|"feeds partitions"| node_splits
node_splits -->|"trains on"| node_unet
node_unet -->|"evaluates"| node_evaluation
node_evaluation -->|"provides signals"| node_feedback
node_feedback -->|"estimates state"| node_hmm
node_hmm -->|"guides policy"| node_adaptive
node_bayes -->|"proposes candidates"| node_adaptive
node_adaptive -->|"sets candidates"| node_budget
node_budget -->|"evaluates trials"| node_evaluation
node_budget -->|"supports comparisons"| node_comparisons
node_comparisons -->|"includes analysis"| node_ablations
node_splits -->|"reserves test set"| node_final_test
node_comparisons -->|"records results"| node_outputs
node_final_test -->|"records metrics"| node_outputs

click node_glas "https://github.com/souravguha09/as-hmm-bo/tree/main/data/raw"
click node_audit "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_preprocessing "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_splits "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_unet "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_evaluation "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_feedback "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_hmm "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_bayes "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_adaptive "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_budget "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_comparisons "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_ablations "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_final_test "https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb"
click node_outputs "https://github.com/souravguha09/as-hmm-bo/tree/main/outputs"

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_glas,node_audit,node_preprocessing,node_splits toneBlue
class node_unet,node_evaluation toneAmber
class node_feedback,node_hmm,node_bayes,node_adaptive,node_budget toneMint
class node_comparisons,node_ablations,node_final_test,node_outputs toneRose
class node_researcher toneIndigo
```

## Components

### Data preparation

- [GlaS dataset](https://github.com/souravguha09/as-hmm-bo/tree/main/data/raw): `data/raw`
- [Dataset audit](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Mask preprocessing](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Patient-aware splits](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`

### Segmentation evaluation

- [U-Net training](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Model evaluation](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`

### Adaptive optimization

- [Optimization feedback](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [HMM state estimate](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Bayesian optimization](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Adaptive candidate policy](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Budgeted trials](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`

### Experiment analysis

- [Optimizer comparisons](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Ablation analysis](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Independent test](https://github.com/souravguha09/as-hmm-bo/blob/main/notebooks/AS-HMM-BO_Research.ipynb): `notebooks/AS-HMM-BO_Research.ipynb`
- [Experiment outputs](https://github.com/souravguha09/as-hmm-bo/tree/main/outputs): `outputs`

### Other components

- **Researcher**

## Connections

- Researcher → GlaS dataset: provides data (evidence: `README.md`)
- GlaS dataset → Dataset audit: audits pairs (evidence: `README.md`)
- Dataset audit → Mask preprocessing: prepares masks (evidence: `README.md`)
- Mask preprocessing → Patient-aware splits: feeds partitions (evidence: `README.md`)
- Patient-aware splits → U-Net training: trains on (evidence: `README.md`)
- U-Net training → Model evaluation: evaluates (evidence: `README.md`)
- Model evaluation → Optimization feedback: provides signals (evidence: `README.md`)
- Optimization feedback → HMM state estimate: estimates state (evidence: `README.md`)
- HMM state estimate → Adaptive candidate policy: guides policy (evidence: `README.md`)
- Bayesian optimization → Adaptive candidate policy: proposes candidates (evidence: `README.md`)
- Adaptive candidate policy → Budgeted trials: sets candidates (evidence: `README.md`)
- Budgeted trials → Model evaluation: evaluates trials (evidence: `README.md`)
- Budgeted trials → Optimizer comparisons: supports comparisons (evidence: `README.md`)
- Optimizer comparisons → Ablation analysis: includes analysis (evidence: `README.md`)
- Patient-aware splits → Independent test: reserves test set (evidence: `README.md`)
- Optimizer comparisons → Experiment outputs: records results (evidence: `README.md`)
- Independent test → Experiment outputs: records metrics (evidence: `README.md`)
