# sengobasar/rabies_experiment_and_system_implementation architecture

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

- Interactive diagram: https://gitdiagram.com/sengobasar/rabies_experiment_and_system_implementation
- Repository: https://github.com/sengobasar/rabies_experiment_and_system_implementation

## Overview

This repository contains two substantial ML workflows: DERIVE for sequence-based model training and a wound-image segmentation trainer. The README provides no additional capability or integration details. The source index and excerpts support the DERIVE training dependencies and wound trainer’s model/data/metric dependencies; other listed application and geospatial files are too small or unsampled to establish their behavior or wiring.

Main entry points: [`notebooks/wound_datasets/wound-segmentation/train.py`](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/train.py) (Segmentation training), [`DERIVE/main_train.py`](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/main_train.py) (DERIVE training), [`DERIVE/model/DERIVE_model.py`](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/model/DERIVE_model.py) (Variational model), [`DERIVE/lib/dist.py`](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/lib/dist.py) (Distributions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_derive["DERIVE sequence modeling"]
  node_derive_train["DERIVE training<br/>[main_train.py]"]
  node_candidate_sets["Candidate sets"]
  node_derive_model["Variational model<br/>[DERIVE_model.py]"]
  node_derive_encoder["Graph encoder<br/>[DERIVE_encoder.py]"]
  node_derive_decoder["Bayesian decoder<br/>[DERIVE_decoder.py]"]
  node_flows["Normalizing flow<br/>[flows.py]"]
  node_distributions["Distributions<br/>[dist.py]"]
  node_distribution_functions["Distribution functions<br/>[functions.py]"]
end

subgraph group_wound["Wound segmentation"]
  node_wound_train["Segmentation training<br/>[train.py]"]
  node_data_generator["Image data generator<br/>[data.py]"]
  node_unet["U-Net model<br/>[unets.py]"]
  node_deeplab["DeepLab model<br/>[deeplab.py]"]
  node_fcn["FCN model<br/>[FCN.py]"]
  node_segnet["SegNet model<br/>[SegNet.py]"]
  node_upsampling["Bilinear upsampling"]
  node_losses["Segmentation losses<br/>[losses.py]"]
  node_metrics["Segmentation metrics<br/>[metrics.py]"]
  node_config_reader["Configuration reader<br/>[read.py]"]
  node_result_writer["Result writer<br/>[write.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"starts training"| node_derive_train
node_derive_train -->|"loads sequence data"| node_candidate_sets
node_derive_train -->|"constructs model"| node_derive_model
node_derive_train -->|"imports flow"| node_flows
node_derive_train -->|"imports distributions"| node_distributions
node_derive_model -->|"constructs encoder"| node_derive_encoder
node_derive_model -->|"constructs decoder"| node_derive_decoder
node_flows -->|"uses Normal"| node_distributions
node_distributions -->|"imports function"| node_distribution_functions
node_researcher -->|"starts training"| node_wound_train
node_wound_train -->|"loads batches"| node_data_generator
node_wound_train -->|"imports model"| node_unet
node_wound_train -->|"builds model"| node_deeplab
node_wound_train -->|"imports model"| node_fcn
node_wound_train -->|"imports model"| node_segnet
node_fcn -->|"uses layer"| node_upsampling
node_wound_train -->|"uses loss"| node_losses
node_wound_train -->|"uses metrics"| node_metrics

click node_derive_train "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/main_train.py"
click node_candidate_sets "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/generate_candidate_set.py"
click node_derive_model "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/model/DERIVE_model.py"
click node_derive_encoder "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/model/DERIVE_encoder.py"
click node_derive_decoder "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/model/DERIVE_decoder.py"
click node_flows "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/lib/flows.py"
click node_distributions "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/lib/dist.py"
click node_distribution_functions "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/lib/functions.py"
click node_wound_train "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/train.py"
click node_data_generator "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/io/data.py"
click node_unet "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/unets.py"
click node_deeplab "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/deeplab.py"
click node_fcn "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/FCN.py"
click node_segnet "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/SegNet.py"
click node_upsampling "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/BilinearUpSampling.py"
click node_losses "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/learning/losses.py"
click node_metrics "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/learning/metrics.py"
click node_config_reader "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/config/read.py"
click node_result_writer "https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/io/write.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_derive_train,node_candidate_sets,node_derive_model,node_derive_encoder,node_derive_decoder,node_flows,node_distributions,node_distribution_functions toneBlue
class node_wound_train,node_data_generator,node_unet,node_deeplab,node_fcn,node_segnet,node_upsampling,node_losses,node_metrics,node_config_reader,node_result_writer toneAmber
class node_researcher toneIndigo
```

## Components

### DERIVE sequence modeling

- [DERIVE training](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/main_train.py): `DERIVE/main_train.py`
- [Candidate sets](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/generate_candidate_set.py): `DERIVE/generate_candidate_set.py`
- [Variational model](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/model/DERIVE_model.py): `DERIVE/model/DERIVE_model.py`
- [Graph encoder](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/model/DERIVE_encoder.py): `DERIVE/model/DERIVE_encoder.py`
- [Bayesian decoder](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/model/DERIVE_decoder.py): `DERIVE/model/DERIVE_decoder.py`
- [Normalizing flow](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/lib/flows.py): `DERIVE/lib/flows.py`
- [Distributions](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/lib/dist.py): `DERIVE/lib/dist.py`
- [Distribution functions](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/DERIVE/lib/functions.py): `DERIVE/lib/functions.py`

### Wound segmentation

- [Segmentation training](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/train.py): `notebooks/wound_datasets/wound-segmentation/train.py`
- [Image data generator](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/io/data.py): `notebooks/wound_datasets/wound-segmentation/utils/io/data.py`
- [U-Net model](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/unets.py): `notebooks/wound_datasets/wound-segmentation/models/unets.py`
- [DeepLab model](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/deeplab.py): `notebooks/wound_datasets/wound-segmentation/models/deeplab.py`
- [FCN model](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/FCN.py): `notebooks/wound_datasets/wound-segmentation/models/FCN.py`
- [SegNet model](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/models/SegNet.py): `notebooks/wound_datasets/wound-segmentation/models/SegNet.py`
- [Bilinear upsampling](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/BilinearUpSampling.py): `notebooks/wound_datasets/wound-segmentation/utils/BilinearUpSampling.py`
- [Segmentation losses](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/learning/losses.py): `notebooks/wound_datasets/wound-segmentation/utils/learning/losses.py`
- [Segmentation metrics](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/learning/metrics.py): `notebooks/wound_datasets/wound-segmentation/utils/learning/metrics.py`
- [Configuration reader](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/config/read.py): `notebooks/wound_datasets/wound-segmentation/utils/config/read.py`
- [Result writer](https://github.com/sengobasar/rabies_experiment_and_system_implementation/blob/main/notebooks/wound_datasets/wound-segmentation/utils/io/write.py): `notebooks/wound_datasets/wound-segmentation/utils/io/write.py`

### Other components

- **Researcher**

## Connections

- Researcher → DERIVE training: starts training (evidence: `DERIVE/main_train.py`)
- DERIVE training → Candidate sets: loads sequence data (evidence: `DERIVE/main_train.py`)
- DERIVE training → Variational model: constructs model (evidence: `DERIVE/main_train.py`)
- DERIVE training → Normalizing flow: imports flow (evidence: `DERIVE/main_train.py`)
- DERIVE training → Distributions: imports distributions (evidence: `DERIVE/main_train.py`)
- Variational model → Graph encoder: constructs encoder (evidence: `DERIVE/model/DERIVE_model.py`)
- Variational model → Bayesian decoder: constructs decoder (evidence: `DERIVE/model/DERIVE_model.py`)
- Normalizing flow → Distributions: uses Normal (evidence: `DERIVE/lib/flows.py`)
- Distributions → Distribution functions: imports function (evidence: `DERIVE/lib/dist.py`)
- Researcher → Segmentation training: starts training (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
- Segmentation training → Image data generator: loads batches (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
- Segmentation training → U-Net model: imports model (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
- Segmentation training → DeepLab model: builds model (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
- Segmentation training → FCN model: imports model (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
- Segmentation training → SegNet model: imports model (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
- FCN model → Bilinear upsampling: uses layer (evidence: `notebooks/wound_datasets/wound-segmentation/models/FCN.py`)
- Segmentation training → Segmentation losses: uses loss (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
- Segmentation training → Segmentation metrics: uses metrics (evidence: `notebooks/wound_datasets/wound-segmentation/train.py`)
