prepare_dataset()
Prepare an .npz dataset from a directory of .npy cell image files.
Usage
prepare_dataset(
data_dir, output, channels=None, ignore=None, single_label=True
)Parameters
data_dir: str-
Directory containing .npy files and optionally metadata.json.
output: str-
Full path for the output .npz file (e.g. ‘/path/to/rois.npz’).
channels: list[str] | None = None-
Channel names. If None, read from metadata.json in data_dir.
ignore: list[str] | None = None-
Labels to exclude (default: [‘unassigned’]).
single_label: bool = True- Skip masks with more than one label (default: True).