Skip to content

Commit b24546f

Browse files
committed
Additional options for unet prediction
1 parent 28d36ff commit b24546f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/prediction/run_prediction_distance_unet.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ def main():
2929
parser.add_argument("--time", action="store_true", help="Time prediction process.")
3030
parser.add_argument("--seg_class", default=None, type=str,
3131
help="Segmentation class to load parameters for masking input.")
32+
parser.add_argument("--center_distance_threshold", default=0.4, type=float,
33+
help="The threshold applied to the distance center predictions to derive seeds.")
34+
parser.add_argument("--boundary_distance_threshold", default=None, type=float,
35+
help="The threshold applied to the boundary predictions to derive seeds. \
36+
By default this is set to 'None', \
37+
in which case the boundary distances are not used for the seeds.")
38+
parser.add_argument("--fg_threshold", default=0.5, type=float,
39+
help="The threshold applied to the foreground prediction for deriving the watershed mask.")
3240

3341
args = parser.parse_args()
3442

@@ -68,6 +76,9 @@ def main():
6876
scale=scale, min_size=min_size,
6977
block_shape=block_shape, halo=halo,
7078
seg_class=args.seg_class,
79+
center_distance_threshold = args.center_distance_threshold,
80+
boundary_distance_threshold = args.boundary_distance_threshold,
81+
fg_threshold = args.fg_threshold,
7182
)
7283

7384
abs_path = os.path.abspath(args.input)
@@ -82,6 +93,9 @@ def main():
8293
scale=scale, min_size=min_size,
8394
block_shape=block_shape, halo=halo,
8495
seg_class=args.seg_class,
96+
center_distance_threshold = args.center_distance_threshold,
97+
boundary_distance_threshold = args.boundary_distance_threshold,
98+
fg_threshold = args.fg_threshold,
8599
)
86100
timer_output = os.path.join(args.output_folder, "timer.json")
87101

0 commit comments

Comments
 (0)