Skip to content

DatasetConfig

Dataset configuration.

Parameters

container_path:

    A path to the zarr/N5 container.

dataset_name:

    The name of the dataset containing the raw data in the container.

secondary_dataset_name:

    The name of the secondary dataset containing the data which needs
    processing.

'dataset_name' and 'secondary_dataset_name' can be thought of as the
output and input to a certain task, respectively.
For example, during segmentation, 'dataset_name' would refer to the output
segmentation masks and 'secondary_dataset_name' would refer to the input
predicted embeddings.
During evaluation, 'dataset_name' would refer to the ground truth masks
and 'secondary_dataset_name' would refer to the input segmentation masks.
Source code in cellulus/configs/dataset_config.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@attrs.define
class DatasetConfig:
    """Dataset configuration.

    Parameters
    ----------

        container_path:

            A path to the zarr/N5 container.

        dataset_name:

            The name of the dataset containing the raw data in the container.

        secondary_dataset_name:

            The name of the secondary dataset containing the data which needs
            processing.

        'dataset_name' and 'secondary_dataset_name' can be thought of as the
        output and input to a certain task, respectively.
        For example, during segmentation, 'dataset_name' would refer to the output
        segmentation masks and 'secondary_dataset_name' would refer to the input
        predicted embeddings.
        During evaluation, 'dataset_name' would refer to the ground truth masks
        and 'secondary_dataset_name' would refer to the input segmentation masks.

    """

    container_path: Path = attrs.field(converter=Path)
    dataset_name: str = attrs.field(validator=instance_of(str))
    secondary_dataset_name: str = attrs.field(
        default=None, validator=optional(instance_of(str))
    )