-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multimodal gnn is functional (#268)
Co-authored-by: anna-grim <[email protected]>
- Loading branch information
Showing
4 changed files
with
102 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ | |
@author: Anna Grim | ||
@email: [email protected] | ||
Generates features for training a model and performing inference. | ||
Generates features for training a machine learning model and performing | ||
inference. | ||
Conventions: | ||
(1) "xyz" refers to a real world coordinate such as those from an swc file | ||
(2) "voxel" refers to an voxel coordinate in a whole exaspim image. | ||
""" | ||
|
@@ -26,7 +26,7 @@ | |
class FeatureGenerator: | ||
""" | ||
Class that generates features vectors that are used by a graph neural | ||
network to classify proposals. | ||
network (GNN) to classify proposals. | ||
""" | ||
# Class attributes | ||
|
@@ -54,7 +54,8 @@ def __init__( | |
Path to the segmentation assumed to be stored on a GCS bucket. The | ||
default is None. | ||
is_multimodal : bool, optional | ||
... | ||
Indication of whether to generate multimodal features (i.e. image | ||
and label patch for each proposal). The default is False. | ||
Returns | ||
------- | ||
|
@@ -118,7 +119,7 @@ def run(self, neurograph, proposals_dict, radius): | |
proposals_dict : dict | ||
Dictionary that contains the items (1) "proposals" which are the | ||
proposals from "neurograph" that features will be generated and | ||
(2) "graph" which is the computation graph used by the gnn. | ||
(2) "graph" which is the computation graph used by the GNN. | ||
radius : float | ||
Search radius used to generate proposals. | ||
|
@@ -156,7 +157,7 @@ def run_on_nodes(self, neurograph, computation_graph): | |
neurograph : NeuroGraph | ||
NeuroGraph generated from a predicted segmentation. | ||
computation_graph : networkx.Graph | ||
Graph used by gnn to classify proposals. | ||
Graph used by GNN to classify proposals. | ||
Returns | ||
------- | ||
|
@@ -175,12 +176,12 @@ def run_on_branches(self, neurograph, computation_graph): | |
neurograph : NeuroGraph | ||
NeuroGraph generated from a predicted segmentation. | ||
computation_graph : networkx.Graph | ||
Graph used by gnn to classify proposals. | ||
Graph used by GNN to classify proposals. | ||
Returns | ||
------- | ||
dict | ||
Dictionary that maps an edge id to a feature vector. | ||
Dictionary that maps an branch id to a feature vector. | ||
""" | ||
return self.branch_skeletal(neurograph, computation_graph) | ||
|
@@ -221,7 +222,7 @@ def node_skeletal(self, neurograph, computation_graph): | |
neurograph : NeuroGraph | ||
NeuroGraph generated from a predicted segmentation. | ||
computation_graph : networkx.Graph | ||
Graph used by gnn to classify proposals. | ||
Graph used by GNN to classify proposals. | ||
Returns | ||
------- | ||
|
@@ -250,7 +251,7 @@ def branch_skeletal(self, neurograph, computation_graph): | |
neurograph : NeuroGraph | ||
NeuroGraph generated from a predicted segmentation. | ||
computation_graph : networkx.Graph | ||
Graph used by gnn to classify proposals. | ||
Graph used by GNN to classify proposals. | ||
Returns | ||
------- | ||
|
@@ -313,7 +314,7 @@ def node_profiles(self, neurograph, computation_graph): | |
neurograph : NeuroGraph | ||
NeuroGraph generated from a predicted segmentation. | ||
computation_graph : networkx.Graph | ||
Graph used by gnn to classify proposals. | ||
Graph used by GNN to classify proposals. | ||
Returns | ||
------- | ||
|
@@ -435,7 +436,7 @@ def get_profile(self, xyz_path, profile_id): | |
def get_spec(self, xyz_path): | ||
""" | ||
Gets image bounding box and voxel coordinates needed to compute an | ||
image intensity profile or extract image chunk for cnn embedding. | ||
image intensity profile or extract image patch. | ||
Parameters | ||
---------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters