Skip to content

Commit 4cdd288

Browse files
More updates in the ribbon segmentation
1 parent 85c5670 commit 4cdd288

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

scripts/inner_ear/training/postprocessing_and_evaluation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
from train_structure_segmentation import get_train_val_test_split
1515

16-
ROOT = "/home/pape/Work/data/synaptic_reconstruction/moser"
17-
# ROOT = "/mnt/lustre-emmy-hdd/projects/nim00007/data/synaptic-reconstruction/moser"
16+
# ROOT = "/home/pape/Work/data/synaptic_reconstruction/moser"
17+
ROOT = "/mnt/lustre-emmy-hdd/projects/nim00007/data/synaptic-reconstruction/moser"
1818
MODEL_PATH = "/mnt/lustre-emmy-hdd/projects/nim00007/models/synaptic-reconstruction/vesicle-DA-inner_ear-v2"
1919
OUTPUT_ROOT = "./predictions"
2020

scripts/inner_ear/training/structure_prediction_and_evaluation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from train_structure_segmentation import get_train_val_test_split
1212
from train_structure_segmentation import noop # noqa
1313

14-
# ROOT = "/mnt/lustre-emmy-hdd/projects/nim00007/data/synaptic-reconstruction/moser"
15-
ROOT = "/home/pape/Work/data/synaptic_reconstruction/moser"
14+
ROOT = "/mnt/lustre-emmy-hdd/projects/nim00007/data/synaptic-reconstruction/moser"
15+
# ROOT = "/home/pape/Work/data/synaptic_reconstruction/moser"
1616
OUTPUT_ROOT = "./predictions"
1717

1818

@@ -176,13 +176,13 @@ def predict_and_evaluate_target_domain(paths, name, adapted_model_path):
176176

177177
def predict_and_evaluate_vesicle_pools():
178178
paths = sorted(glob(os.path.join(ROOT, "other_tomograms/01_vesicle_pools", "*.h5")))
179-
adapted_model_path = "./checkpoints/structure-model-adapt-vesicle_pools"
179+
adapted_model_path = "./checkpoints/structure-model-adapt-vesicle_pools-v2"
180180
predict_and_evaluate_target_domain(paths, "vesicle_pools", adapted_model_path)
181181

182182

183183
def predict_and_evaluate_rat():
184184
paths = sorted(glob(os.path.join(ROOT, "other_tomograms/03_ratten_tomos", "*.h5")))
185-
adapted_model_path = "./checkpoints/structure-model-adapt-rat"
185+
adapted_model_path = "./checkpoints/structure-model-adapt-rat-v2"
186186
predict_and_evaluate_target_domain(paths, "rat", adapted_model_path)
187187

188188

synaptic_reconstruction/inference/ribbon_synapse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def segment_ribbon_synapse_structures(
3636
and the predictions if return_predictions is True.
3737
"""
3838
if verbose:
39-
print("Segmenting mitochondria in volume of shape", input_volume.shape)
39+
print("Segmenting ribbon synapse structures in volume of shape", input_volume.shape)
4040
# Create the scaler to handle prediction with a different scaling factor.
4141
scaler = _Scaler(scale, verbose)
4242
input_volume = scaler.scale_input(input_volume)
@@ -49,7 +49,7 @@ def segment_ribbon_synapse_structures(
4949
assert len(structure_names) == predictions.shape[0]
5050

5151
predictions = {
52-
name: scaler.scale_output(predictions[i], is_segmentation=False) for i, name in enumerate(structure_names)
52+
name: scaler.rescale_output(predictions[i], is_segmentation=False) for i, name in enumerate(structure_names)
5353
}
5454
if threshold is not None:
5555
for name in structure_names:

0 commit comments

Comments
 (0)