ImagenSemanticMask

@PublicPreviewAPI
class ImagenSemanticMask : ImagenMaskReference


Represents a generated mask for Imagen editing which masks out certain objects using object detection.

Summary

Public constructors

ImagenSemanticMask(classes: List<Int>, dilation: Double?)

Public constructors

ImagenSemanticMask

ImagenSemanticMask(classes: List<Int>, dilation: Double? = null)
Parameters
classes: List<Int>

the list of segmentation IDs for objects to detect and mask out. Find a list of segmentation IDs in the Vertex AI documentation.

dilation: Double? = null

the amount to dilate the mask. This can help smooth the borders of an edit and make it seem more convincing. For example, 0.05 will dilate the mask 5%.