Class MaskImageConfig (1.90.0)

MaskImageConfig(
 mask_mode: typing.Literal[
 "MASK_MODE_DEFAULT",
 "MASK_MODE_USER_PROVIDED",
 "MASK_MODE_BACKGROUND",
 "MASK_MODE_FOREGROUND",
 "MASK_MODE_SEMANTIC",
 ],
 segmentation_classes: typing.Optional[typing.List[int]] = None,
 dilation: typing.Optional[float] = None,
)

Mask image config.

Attributes

Name Description
mask_mode Literal['MASK_MODE_DEFAULT', 'MASK_MODE_USER_PROVIDED', 'MASK_MODE_BACKGROUND', 'MASK_MODE_FOREGROUND', 'MASK_MODE_SEMANTIC']
Mask mode for the image. Can take the following values: * MASK_MODE_DEFAULT: Default mask mode * MASK_MODE_USER_PROVIDED: User provided mask * MASK_MODE_BACKGROUND: Background mask * MASK_MODE_FOREGROUND: Foreground mask * MASK_MODE_SEMANTIC: Semantic mask
dilation Optional[float]
Dilation percentage of the mask provided. Float between 0 and 1. Defaults to 1.0
segmentation_classes Optional[List[int]]
List of class IDs for segmentation. Max of 5 IDs

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.