Skip to content

Commit 9f3b998

Browse files
anna-grimanna-grim
andauthored
Cloud merge detection (#52)
* refactor: valid labels * refactor: valid_id generation --------- Co-authored-by: anna-grim <[email protected]>
1 parent c53e904 commit 9f3b998

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/segmentation_skeleton_metrics/skeleton_metric.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
from scipy.spatial import KDTree
1818

1919
from segmentation_skeleton_metrics import graph_utils as gutils
20-
from segmentation_skeleton_metrics import split_detection, utils
21-
from segmentation_skeleton_metrics import swc_utils
20+
from segmentation_skeleton_metrics import split_detection, swc_utils, utils
2221
from segmentation_skeleton_metrics.swc_utils import (
2322
get_xyz_coords,
2423
save,
@@ -130,7 +129,7 @@ def init_valid_labels(self, valid_size_threshold):
130129
for path in self.pred_swc_paths:
131130
contents = swc_utils.read(path)
132131
if len(contents) > valid_size_threshold:
133-
self.valid_labels.add(utils.get_swc_id(path))
132+
self.valid_labels.add(int(utils.get_swc_id(path)))
134133

135134
def init_graphs(self, paths, anisotropy):
136135
"""

src/segmentation_skeleton_metrics/swc_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def to_graph(path, anisotropy=[1.0, 1.0, 1.0]):
177177
178178
"""
179179
graph = nx.Graph(swc_id=utils.get_swc_id(path))
180-
offset = [0, 0, 0]
180+
offset = [0, 0, 0]
181181
for line in read(path):
182182
if line.startswith("# OFFSET"):
183183
parts = line.split()

0 commit comments

Comments
 (0)