# shahrukhqasim/ties-2.0 architecture

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

- Interactive diagram: https://gitdiagram.com/shahrukhqasim/ties-2.0
- Repository: https://github.com/shahrukhqasim/ties-2.0

## Overview

TIES-2.0 extracts table structure from images using graph-neural-network models. The workflow is configured dataset input, iterative training or inference, then inference-output analysis and plots. The README documents training, inference, TFRecord datasets, and model variants; sampled source confirms the iterator/model/data and output-writing relationships. Some model internals and plotting/feedback implementations are indexed but not excerpted, so their undocumented connections are omitted.

Main entry points: [`python/models/model_factory.py`](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/model_factory.py) (Model factory), [`python/models/basic_model.py`](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/basic_model.py) (Table graph model), [`python/iterators/table_adjacency_parsing_iterator.py`](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/iterators/table_adjacency_parsing_iterator.py) (Train and test iterator), [`python/bin/iterate/table_adjacency_parsing.py`](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/bin/iterate/table_adjacency_parsing.py) (CLI entrypoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Run workflow"]
  node_config["Run configuration<br/>[config.ini.example]"]
  node_entry["CLI entrypoint"]
  node_iterator["Train and test iterator"]
  node_config_manager["Configuration manager"]
end

subgraph group_data["Table data"]
  node_dataset[("TFRecord dataset")]
  node_reader["Image and word reader"]
end

subgraph group_models["Model architecture"]
  node_model_factory["Model factory<br/>[model_factory.py]"]
  node_basic_model["Table graph model<br/>[basic_model.py]"]
  node_conv_segment["Convolution segments"]
  node_conv_variant["Basic convolution segment<br/>[conv_segment.py]"]
  node_dgcnn["DGCNN segment<br/>[dgcnn_segment.py]"]
  node_garnet["GarNet segment<br/>[garnet_segment.py]"]
  node_fcnn["FCNN segment<br/>[fcnn_segment.py]"]
  node_gravnet["GravNet segment<br/>[gravnet_segment.py]"]
  node_graph_ops["Graph operations<br/>[ties.py]"]
end

subgraph group_outputs["Results and analysis"]
  node_inference["Inference output files"]
  node_analyser["Inference analyser"]
  node_plots["Result plots<br/>[plots.py]"]
  node_feedback["Visual feedback"]
end

node_user(("Researcher"))

node_user -->|"runs"| node_entry
node_entry -->|"initializes"| node_config_manager
node_config -->|"configures"| node_entry
node_iterator -->|"reads settings"| node_config_manager
node_entry -->|"dispatches"| node_iterator
node_iterator -->|"requests model"| node_model_factory
node_model_factory -->|"creates"| node_basic_model
node_model_factory -->|"selects"| node_conv_segment
node_model_factory -->|"selects"| node_dgcnn
node_model_factory -->|"selects"| node_garnet
node_model_factory -->|"selects"| node_fcnn
node_model_factory -->|"selects"| node_gravnet
node_model_factory -->|"imports variant"| node_conv_variant
node_iterator -->|"runs iterations"| node_basic_model
node_dataset -->|"provides records"| node_reader
node_basic_model -->|"loads batches"| node_reader
node_basic_model -->|"uses operations"| node_graph_ops
node_basic_model -->|"writes samples"| node_inference
node_basic_model -->|"generates feedback"| node_feedback
node_inference -->|"supplies predictions"| node_analyser
node_analyser -->|"loads settings"| node_config_manager
node_analyser -->|"plots results"| node_plots

click node_config "https://github.com/shahrukhqasim/ties-2.0/blob/master/configs/config.ini.example"
click node_entry "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/bin/iterate/table_adjacency_parsing.py"
click node_iterator "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/iterators/table_adjacency_parsing_iterator.py"
click node_config_manager "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/configuration_manager.py"
click node_reader "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/readers/image_words_reader.py"
click node_model_factory "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/model_factory.py"
click node_basic_model "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/basic_model.py"
click node_conv_segment "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/fast_conv_segment.py"
click node_conv_variant "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/conv_segment.py"
click node_dgcnn "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/dgcnn_segment.py"
click node_garnet "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/garnet_segment.py"
click node_fcnn "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/fcnn_segment.py"
click node_gravnet "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/gravnet_segment.py"
click node_graph_ops "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/ops/ties.py"
click node_inference "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/inference_output_streamer.py"
click node_analyser "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/bin/analyse/table_adjacency_inference_analyser.py"
click node_plots "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/plots.py"
click node_feedback "https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/visual_feedback_generator.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_config,node_entry,node_iterator,node_config_manager toneBlue
class node_dataset,node_reader toneAmber
class node_model_factory,node_basic_model,node_conv_segment,node_conv_variant,node_dgcnn,node_garnet,node_fcnn,node_gravnet,node_graph_ops toneMint
class node_inference,node_analyser,node_plots,node_feedback toneRose
class node_user toneIndigo
```

## Components

### Run workflow

- [Run configuration](https://github.com/shahrukhqasim/ties-2.0/blob/master/configs/config.ini.example): `configs/config.ini.example`
- [CLI entrypoint](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/bin/iterate/table_adjacency_parsing.py): `python/bin/iterate/table_adjacency_parsing.py`
- [Train and test iterator](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/iterators/table_adjacency_parsing_iterator.py): `python/iterators/table_adjacency_parsing_iterator.py`
- [Configuration manager](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/configuration_manager.py): `python/libs/configuration_manager.py`

### Table data

- **TFRecord dataset**
- [Image and word reader](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/readers/image_words_reader.py): `python/readers/image_words_reader.py`

### Model architecture

- [Model factory](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/model_factory.py): `python/models/model_factory.py`
- [Table graph model](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/basic_model.py): `python/models/basic_model.py`
- [Convolution segments](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/fast_conv_segment.py): `python/models/fast_conv_segment.py`
- [Basic convolution segment](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/conv_segment.py): `python/models/conv_segment.py`
- [DGCNN segment](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/dgcnn_segment.py): `python/models/dgcnn_segment.py`
- [GarNet segment](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/garnet_segment.py): `python/models/garnet_segment.py`
- [FCNN segment](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/fcnn_segment.py): `python/models/fcnn_segment.py`
- [GravNet segment](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/models/gravnet_segment.py): `python/models/gravnet_segment.py`
- [Graph operations](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/ops/ties.py): `python/ops/ties.py`

### Results and analysis

- [Inference output files](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/inference_output_streamer.py): `python/libs/inference_output_streamer.py`
- [Inference analyser](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/bin/analyse/table_adjacency_inference_analyser.py): `python/bin/analyse/table_adjacency_inference_analyser.py`
- [Result plots](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/plots.py): `python/libs/plots.py`
- [Visual feedback](https://github.com/shahrukhqasim/ties-2.0/blob/master/python/libs/visual_feedback_generator.py): `python/libs/visual_feedback_generator.py`

### Other components

- **Researcher**

## Connections

- Researcher → CLI entrypoint: runs (evidence: `README.md`)
- CLI entrypoint → Configuration manager: initializes (evidence: `python/bin/iterate/table_adjacency_parsing.py`)
- Run configuration → CLI entrypoint: configures (evidence: `README.md`)
- Train and test iterator → Configuration manager: reads settings (evidence: `python/iterators/table_adjacency_parsing_iterator.py`)
- CLI entrypoint → Train and test iterator: dispatches (evidence: `python/bin/iterate/table_adjacency_parsing.py`)
- Train and test iterator → Model factory: requests model (evidence: `python/iterators/table_adjacency_parsing_iterator.py`)
- Model factory → Table graph model: creates (evidence: `python/models/model_factory.py`)
- Model factory → Convolution segments: selects (evidence: `python/models/model_factory.py`)
- Model factory → DGCNN segment: selects (evidence: `python/models/model_factory.py`)
- Model factory → GarNet segment: selects (evidence: `python/models/model_factory.py`)
- Model factory → FCNN segment: selects (evidence: `python/models/model_factory.py`)
- Model factory → GravNet segment: selects (evidence: `python/models/model_factory.py`)
- Model factory → Basic convolution segment: imports variant (evidence: `python/models/model_factory.py`)
- Train and test iterator → Table graph model: runs iterations (evidence: `python/iterators/table_adjacency_parsing_iterator.py`)
- TFRecord dataset → Image and word reader: provides records (evidence: `python/readers/image_words_reader.py`)
- Table graph model → Image and word reader: loads batches (evidence: `python/models/basic_model.py`)
- Table graph model → Graph operations: uses operations (evidence: `python/models/basic_model.py`)
- Table graph model → Inference output files: writes samples (evidence: `python/models/basic_model.py`)
- Table graph model → Visual feedback: generates feedback (evidence: `python/models/basic_model.py`)
- Inference output files → Inference analyser: supplies predictions (evidence: `python/bin/analyse/table_adjacency_inference_analyser.py`)
- Inference analyser → Configuration manager: loads settings (evidence: `python/bin/analyse/table_adjacency_inference_analyser.py`)
- Inference analyser → Result plots: plots results (evidence: `python/bin/analyse/table_adjacency_inference_analyser.py`)
