Skip to content

Commit df08168

Browse files
Merge branch 'syn-marker-training' of https://github.com/computational-cell-analytics/flamingo-tools into syn-marker-training
2 parents 6a1236d + 59f450a commit df08168

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

scripts/synapse_marker_detection/check_synapse_prediction.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import h5py
2+
import napari
23
import zarr
4+
35
from torch_em.util import load_model
46
from torch_em.util.prediction import predict_with_halo
57
from train_synapse_detection import get_paths
@@ -16,9 +18,18 @@ def run_prediction(val_image):
1618
def main():
1719
val_paths, _ = get_paths("val")
1820
val_image = zarr.open(val_paths[0])["raw"][:]
19-
pred = run_prediction(val_image)
20-
with h5py.File("pred.h5", "a") as f:
21-
f.create_dataset("pred", data=pred, compression="gzip")
21+
22+
# pred = run_prediction(val_image)
23+
# with h5py.File("pred.h5", "a") as f:
24+
# f.create_dataset("pred", data=pred, compression="gzip")
25+
26+
with h5py.File("pred.h5", "r") as f:
27+
pred = f["pred"][:]
28+
29+
v = napari.Viewer()
30+
v.add_image(val_image)
31+
v.add_image(pred)
32+
napari.run()
2233

2334

2435
if __name__ == "__main__":

scripts/synapse_marker_detection/train_synapse_detection.py

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

44
from detection_dataset import DetectionDataset
55

6-
# sys.path.append("/home/pape/Work/my_projects/czii-protein-challenge")
7-
sys.path.append("/user/pape41/u12086/Work/my_projects/czii-protein-challenge")
6+
sys.path.append("/home/pape/Work/my_projects/czii-protein-challenge")
7+
# sys.path.append("/user/pape41/u12086/Work/my_projects/czii-protein-challenge")
88

99
from utils.training.training import supervised_training # noqa
1010

0 commit comments

Comments
 (0)