Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion flamingo_tools/segmentation/synapse_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,18 @@ def marker_detection(
if os.path.exists(output_path) and prediction_key in zarr.open(output_path, "r"):
skip_prediction = True

# skip prediction if post-processed output exists
detection_path = os.path.join(output_folder, "synapse_detection.tsv")
if os.path.exists(detection_path):
skip_prediction = True

if not skip_prediction:
prediction_impl(
input_path, input_key, output_folder, model_path,
scale=None, block_shape=block_shape, halo=halo,
apply_postprocessing=False, output_channels=1,
)

detection_path = os.path.join(output_folder, "synapse_detection.tsv")
if not os.path.exists(detection_path):
input_ = zarr.open(output_path, "r")[prediction_key]
detections = find_local_maxima(
Expand Down
41 changes: 41 additions & 0 deletions reproducibility/block_extraction/GEK233L_IHC.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[
{
"cochlea": "G_EK_000233_L",
"image_channel": [
"Vglut3",
"IHC_v6"
],
"halo_size": [
196,
196,
80
],
"crop_centers": [
[
593,
1018,
276
],
[
674,
1048,
1574
],
[
788,
937,
255
],
[
950,
1450,
380
],
[
1120,
875,
360
]
]
}
]
50 changes: 50 additions & 0 deletions reproducibility/block_extraction/GLR233R_SGN_DA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[
{
"cochlea": "G_LR_000233_R",
"image_channel": [
"PV"
],
"halo_size": [
196,
196,
196
],
"crop_centers": [
[
620,
1060,
1050
],
[
1555,
1170,
1230
],
[
1600,
1075,
1090
],
[
1390,
1430,
1375
],
[
650,
1130,
1000
],
[
800,
1230,
710
],
[
600,
1100,
1055
]
]
}
]
36 changes: 36 additions & 0 deletions reproducibility/block_extraction/GLR233R_SGN_train.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"cochlea": "G_LR_000233_R",
"image_channel": [
"PV",
"SGN_v2-DA"
],
"halo_size": [
196,
196,
48
],
"crop_centers": [
[
1584,
1570,
958
],
[
1474,
1655,
730
],
[
1275,
1604,
1324
],
[
1603,
1240,
1279
]
]
}
]
25 changes: 25 additions & 0 deletions reproducibility/block_extraction/LaVision-M04_SGN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
{
"cochlea": "LaVision-M04",
"image_channel": [
"PV"
],
"resolution" : [
1.887779,
1.887779,
3.0
],
"halo_size": [
128,
128,
64
],
"crop_centers": [
[
2550,
2340,
440
]
]
}
]
41 changes: 41 additions & 0 deletions reproducibility/block_extraction/LaVision_IHC_M04.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[
{
"cochlea": "LaVision-M04",
"image_channel": [
"MYO",
"IHC_LOWRES-v1"
],
"resolution" : [
1.887779,
1.887779,
3.0
],
"halo_size": [
128,
128,
32
],
"crop_centers": [
[
3118,
2840,
500
],
[
1540,
2075,
924
],
[
2135,
835,
627
],
[
2025,
1332,
221
]
]
}
]
84 changes: 84 additions & 0 deletions reproducibility/block_extraction/LaVision_OTOF_IHC.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[
{
"cochlea": "LaVision-OTOF23R",
"image_channel": [
"CR",
"IHC_LOWRES-v2"
],
"resolution" : [
1.887779,
1.887779,
3.0
],
"halo_size": [
128,
128,
48
],
"crop_centers": [
[
1360,
3450,
732
],
[
2408,
913,
688
],
[
2700,
3220,
620
]
]
},
{
"cochlea": "LaVision-OTOF25R",
"image_channel": [
"CR",
"IHC_LOWRES-v2"
],
"resolution" : [
1.887779,
1.887779,
3.0
],
"halo_size": [
128,
128,
48
],
"crop_centers": [
[
2490,
3460,
875
]
]
},
{
"cochlea": "LaVision-OTOF36R",
"image_channel": [
"CR",
"IHC_LOWRES-v2"
],
"resolution" : [
1.887779,
1.887779,
3.0
],
"halo_size": [
128,
128,
48
],
"crop_centers": [
[
2558,
3415,
871
]
]
}
]
93 changes: 93 additions & 0 deletions reproducibility/block_extraction/LaVision_SGN_empty.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[
{
"cochlea": "LaVision-M04",
"image_channel": [
"PV"
],
"resolution" : [
1.887779,
1.887779,
3.0
],
"halo_size": [
128,
128,
64
],
"crop_centers": [
[
396,
1906,
383
],
[
830,
3390,
670
],
[
3520,
1525,
310
],
[
1867,
2538,
390
],
[
400,
2500,
840
]
]
},
{
"cochlea": "LaVision-Mar05",
"image_channel": [
"PV"
],
"resolution" : [
1.887779,
1.887779,
3.0
],
"halo_size": [
128,
128,
64
],
"crop_centers": [
[
2247,
2434,
1660
],
[
1182,
2920,
726
],
[
2530,
1660,
1840
],
[
620,
1900,
1825
],
[
1330,
3375,
1114
],
[
3442,
2950,
1000
]
]
}
]
Loading
Loading