SegmentationImageLogger

class easypl.callbacks.loggers.image_segmentation.SegmentationImageLogger(phase: str = 'train', max_samples: int = 1, class_names: Optional[List] = None, num_classes: Optional[int] = None, max_log_classes: Optional[int] = None, mode: str = 'first', sample_key: Optional = None, score_func: Optional[Callable] = None, largest: bool = True, dir_path: Optional[str] = None, save_on_disk: bool = False, background_class=0, dpi=100)

Callback class for logging images in segmentation task

phase

Phase which will be used by this Logger. Available: [“train”, “val”, “test”, “predict”].

Type

str

max_samples

Maximum number of samples which will be logged at one epoch.

Type

int

class_names

List of class names for pretty logging. If None, then class_names will set range of number of classes.

Type

Optional[List]

num_classes

Number of classes. Necessary if class_names is None.

Type

Optional[int]

max_log_classes

Max of number classes, which will be logged in one sample.

Type

Optional[int]

mode

Mode of sample generation. Available modes: [“random”, “first”, “top”].

Type

str

sample_key

Key of batch, which define sample. If None, then sample_key will parse learner.data_keys.

Type

Optional

score_func

Function for score evaluation. Necessary if “mode” = “top”.

Type

Optional[Callable]

largest

Sorting order for “top” mode

Type

bool

dir_path

If defined, then logs will be writed in this directory. Else in lighting_logs.

Type

Optional[str]

save_on_disk

If true, then logs will be writed on disk to “dir_path”.

Type

bool

background_class

Index of background class

Type

int, default: 0

dpi

Dots per inch

Type

int, default: 100

_log_on_disk(samples: List, dataloader_idx: int = 0)

Method for logging on disk.

samples

List of returns from get_log.

Type

List

dataloader_idx

Index of dataloader.

Type

int, default: 0

_log_tensorboard(samples: List, dataloader_idx: int = 0)

Method for tensorboard logging.

samples

List of returns from get_log.

Type

List

dataloader_idx

Index of dataloader.

Type

int, default: 0

_log_wandb(samples: List, dataloader_idx: int = 0)

Method for wandb logging.

samples

List of returns from get_log.

Type

List

dataloader_idx

Index of dataloader.

Type

int, default: 0