Skip to content

modosaic.core.validator

modosaic.core.validator

ModalityValidator

Bases: ABC

Interface for modality validators.

validate abstractmethod

validate(record, generated)

Validate a generated modality output.

Parameters:

Name Type Description Default
record ImageRecord

Input image record.

required
generated T

Generated modality output.

required

Returns:

Type Description
U

Validator-specific score or statistics object.

Source code in modosaic/core/validator.py
13
14
15
16
17
18
19
20
21
22
23
24
@abstractmethod
def validate(self, record: ImageRecord, generated: T) -> U:
    """Validate a generated modality output.

    Args:
        record: Input image record.
        generated: Generated modality output.

    Returns:
        Validator-specific score or statistics object.
    """
    raise NotImplementedError()