neuralib.segmentation.base
- class neuralib.segmentation.base.AbstractSegmentationOption[source]
- DESCRIPTION: str = 'ABC for cellular segmentation'
parser description.
- EX_GROUP_SOURCE = 'EX_GROUP_SOURCE'
- file: Path
image file path
- directory: Path
images directory for batch processing
- directory_suffix: str
suffix in batch mode
- save_ij_roi: bool
if save also the imageJ/Fiji compatible .roi file
- force_re_eval: bool
force re-evaluate the result
- model: str
which pretrained model
- no_normalize: bool
NOT DO Percentile-based image normalization for eval
- napari_view: bool
view in napari
- property file_mode: bool
Flag file mode
- property batch_mode: bool
Flag batch mode
- raw_image()[source]
Load image from file and convert to grayscale
- Returns:
Array[float, [H, W]]
- Return type:
ndarray
- foreach_raw_image()[source]
Load image from a directory and convert to grayscale
- Returns:
Tuple of filepath and image Array[float, [H, W]]
- Return type:
Iterable[tuple[Path, ndarray]]
- foreach_normalize_image()[source]
Normalize the image in batch mode
- Returns:
Tuple of filepath and image Array[float, [H, W]]
- Return type:
Iterable[tuple[Path, ndarray]]
- abstract seg_output(filepath)[source]
Get segmented output save path
- Parameters:
filepath (Path) – filepath for image
- Returns:
segmented output save path
- Return type:
Path
- ij_roi_output(filepath)[source]
Get imageJ/Fiji
.roioutput save path- Parameters:
filepath (Path) – filepath for image
- Returns:
ij roi output save path
- Return type:
Path