Skip to content

Commit

Permalink
refactor: feature generation (#262)
Browse files Browse the repository at this point in the history
Co-authored-by: anna-grim <[email protected]>
  • Loading branch information
anna-grim and anna-grim authored Oct 8, 2024
1 parent 2a2a8a8 commit c772340
Show file tree
Hide file tree
Showing 11 changed files with 866 additions and 1,018 deletions.
1 change: 1 addition & 0 deletions src/deep_neurographs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class MLConfig:
threshold: float = 0.6
model_type: str = "GraphNeuralNet"
n_epochs: int = 1000
use_img_embedding: bool = False
validation_split: float = 0.15
weight_decay: float = 1e-3

Expand Down
8 changes: 4 additions & 4 deletions src/deep_neurographs/generate_proposals.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def run_trimming(neurograph, proposals, radius, progress_bar):

def trim_endpoints(neurograph, i, j, radius):
# Initializations
branch_i = neurograph.get_branch(i)
branch_j = neurograph.get_branch(j)
branch_i = neurograph.branch(i)
branch_j = neurograph.branch(j)

# Check both orderings
idx_i, idx_j = trim_endpoints_ordered(branch_i, branch_j)
Expand Down Expand Up @@ -394,8 +394,8 @@ def trim_to_idx(neurograph, i, idx):
"""
# Update node
branch_xyz = neurograph.get_branch(i, key="xyz")
branch_radii = neurograph.get_branch(i, key="radius")
branch_xyz = neurograph.branch(i, key="xyz")
branch_radii = neurograph.branch(i, key="radius")
neurograph.nodes[i]["xyz"] = branch_xyz[idx]
neurograph.nodes[i]["radius"] = branch_radii[idx]

Expand Down
Loading

0 comments on commit c772340

Please sign in to comment.