Extraction of graphs from skeletonised images — a TensorFlow implementation.
Related: data generation, sample GUI implementation
The graph extraction consists of a node extraction part, an edge extraction part and a combination scheme for the edge predictions.
The nodes as well as their attributes are extracted using a model based on the U-Net.
Positions | Degrees | Types |
---|---|---|
0, 1, 2, 3, 4 | end, crossing, border |
Current best model: b_16_d2 [id: pqphq89g] (wandb) (yaml) (h5)
- Define configuration:
- Dataset config -- change
data_path
andvalidation_fraction
as needed. - Model config in configs, e.g.sample_nodes_nn.yaml.
- Dataset config -- change
- Set config filepath in nodes_nn.py (L7)
- Run nodes_nn.py.
nohup python nodes_nn.py > nodes_nn_log.txt &
- Initialise variables:
- Set network type to
NetworkType.NODES_NN
in evaluate.py (L5). - Populate
model_ids
list with the IDs of the model(s) to be tested in evaluate.py (L6). - Ensure that
eval_nodes_nn.yaml
is set in the second argument ofrun.get_configs
in evaluate.py (L11).
- Set network type to
- Model configuration and weights — ensure that these files exist:
- Model config yaml file in configs, e.g.sample_nodes_nn.yaml.
- Model weights in the path used in evaluate.py (L19).
Default path:wandb/{model_id}.h5
.
- Choose the type of evaluation to be done,
modify/comment out what's not needed:
- Visualise batch predictions (L31 - L33)
- Evaluate metrics per test image (L35 - L41)
- Run evaluate.py.
Prediction of the existence of an edge between a pair of nodes using a VGG-based model.
Current best model: baseline (wandb) (yaml) (h5)
Parallel batched edge predictions.