ls_mlkit.util.mask.masker_interface module

class ls_mlkit.util.mask.masker_interface.MaskerInterface(*args, **kwargs: dict[Any, Any])[source]

Bases: ABC

abstractmethod apply_inpainting_mask(x_0: Tensor, x_t: Tensor, inpainting_mask: Tensor) Tensor[source]

1 represents the region that can be seen

abstractmethod apply_mask(x: Tensor, mask: Tensor) Tensor[source]
abstractmethod check_mask_shape(x: Tensor, mask: Tensor)[source]

check whether the shape of mask is as expected

abstractmethod count_bright_area(mask: Tensor) Tensor[source]

Bright area can be seen Dark area cannot be seen

abstractmethod get_full_bright_mask(x: Tensor) Tensor[source]

Return a mask that is all bright