Skip to content

Commit 92303d7

Browse files
Adjust block_shape based on input dimensions
1 parent c2edc8d commit 92303d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flamingo_tools/segmentation/synapse_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def marker_detection(
182182
)
183183

184184
if not os.path.exists(detection_path):
185-
block_shape = (64, 256, 256)
186185
input_ = zarr.open(output_path, "r")[prediction_key]
186+
block_shape = (min(64, input_.shape[0]), min(input_.shape[1], 256), min(input_.shape[2], 256))
187187
detections = find_local_maxima(
188188
input_, block_shape=block_shape, min_distance=2, threshold_abs=0.5, verbose=True, n_threads=16,
189189
)

0 commit comments

Comments
 (0)