Skip to content

Commit a7c1e06

Browse files
committed
Increse min_patch_size to 10 pixels
1 parent 44199a0 commit a7c1e06

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sopa/cli/segmentation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def cellpose(
3434
1, help="Parameter for scipy gaussian_filter (applied before running cellpose)"
3535
),
3636
min_patch_size: int = typer.Option(
37-
5,
37+
10,
3838
help="Minimum patch size (in pixels) for both width and height. Patches smaller than this will be skipped to avoid segmentation errors.",
3939
),
4040
patch_index: int = typer.Option(
@@ -106,7 +106,7 @@ def stardist(
106106
help="Parameter for scipy gaussian_filter (applied before running the segmentation method)",
107107
),
108108
min_patch_size: int = typer.Option(
109-
5,
109+
10,
110110
help="Minimum patch size (in pixels) for both width and height. Patches smaller than this will be skipped to avoid segmentation errors.",
111111
),
112112
patch_index: int = typer.Option(
@@ -171,7 +171,7 @@ def generic_staining(
171171
help="Parameter for scipy gaussian_filter (applied before running the segmentation method)",
172172
),
173173
min_patch_size: int = typer.Option(
174-
5,
174+
10,
175175
help="Minimum patch size (in pixels) for both width and height. Patches smaller than this will be skipped to avoid segmentation errors.",
176176
),
177177
patch_index: int = typer.Option(
@@ -227,7 +227,7 @@ def _run_staining_segmentation(
227227
gaussian_sigma: float,
228228
patch_index: int | None,
229229
cache_dir_name: str | None,
230-
min_patch_size: int = 5,
230+
min_patch_size: int = 10,
231231
**method_kwargs: Any,
232232
):
233233
from sopa.io.standardize import read_zarr_standardized

sopa/segmentation/_stainings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(
3333
clip_limit: float = 0.2,
3434
clahe_kernel_size: int | Iterable[int] | None = None,
3535
gaussian_sigma: float = 1,
36-
min_patch_size: int = 5,
36+
min_patch_size: int = 10,
3737
):
3838
"""Generalized staining-based segmentation class
3939

sopa/segmentation/methods/_custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def custom_staining_based(
2121
gaussian_sigma: float = 1,
2222
cache_dir_name: str = SopaKeys.CUSTOM_BOUNDARIES,
2323
key_added: str = SopaKeys.CUSTOM_BOUNDARIES,
24-
min_patch_size: int = 5,
24+
min_patch_size: int = 10,
2525
):
2626
"""Run a generic staining-based segmentation model, and add a GeoDataFrame containing the cell boundaries.
2727

0 commit comments

Comments
 (0)