neuralib.segmentation.stardist.run_2d.StarDist2DOptions

class neuralib.segmentation.stardist.run_2d.StarDist2DOptions[source]

Bases: AbstractSegmentationOption

__init__()

Methods

__init__()

eval(**kwargs)

eval the model in single file or batch files, and save the results

foreach_normalize_image()

Normalize the image in batch mode

foreach_raw_image()

Load image from a directory and convert to grayscale

ij_roi_output(filepath)

Get imageJ/Fiji .roi output save path

launch_napari([with_widget])

Launch napari viewer for stardist results

main([args, parse_only, system_exit])

parsing the commandline input args and call run().

new_parser(**kwargs)

create an ArgumentParser.

normalize_image()

Normalize the image

raw_image()

Load image from file and convert to grayscale

run()

called after main()

seg_output(filepath)

Get output save path

Attributes

DESCRIPTION

parser description.

EPILOG

parser epilog.

EX_GROUP_SOURCE

USAGE

parser usage.

batch_mode

Flag batch mode

directory

images directory for batch processing

directory_suffix

suffix in batch mode

file

image file path

file_mode

Flag file mode

force_re_eval

force re-evaluate the result

model

stardist pretrained model

napari_view

view in napari

no_normalize

NOT DO Percentile-based image normalization for eval

prob_thresh

Consider only object candidates from pixels with predicted object probability above this threshold.

save_ij_roi

if save also the imageJ/Fiji compatible .roi file

DESCRIPTION: str = 'Run the Stardist model for segmentation'

parser description. Could be override as a method if its content is dynamic-generated.

model: Literal['2D_versatile_fluo', '2D_versatile_he', '2D_paper_dsb2018', '2D_demo']

stardist pretrained model

prob_thresh: float

Consider only object candidates from pixels with predicted object probability above this threshold. Seealso: stardist.models.base._predict_instances_generator: prob_thresh

run()[source]

called after main()

seg_output(filepath)[source]

Get output save path

Parameters:

filepath (Path) – filepath for image

Returns:

output save path

Return type:

Path

eval(**kwargs)[source]

eval the model in single file or batch files, and save the results

Return type:

None

launch_napari(with_widget=False)[source]

Launch napari viewer for stardist results

Parameters:

with_widget (bool) – If True, launch also with the starDist widget (required package stardist-napari)