ls_mlkit.util.mask.image_masker module

class ls_mlkit.util.mask.image_masker.ImageMasker(ndim_mini_micro_shape: int = 0, **kwargs: dict[Any, Any])[source]

Bases: MaskerInterface

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

1 represents the region that can be seen

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

check whether the shape of mask is as expected

count_bright_area(mask: Tensor) Tensor[source]

Bright area can be seen Dark area cannot be seen

get_full_bright_mask(x: Tensor) Tensor[source]

Return a mask that is all bright