Annotation details specific to image segmentation.
annotationUnion type
annotation can be only one of the following:Mask based segmentation annotation. Only one mask annotation can exist for one image.
Polygon annotation.
Polyline annotation.
| JSON representation |
|---|
{ // annotation "maskAnnotation": { object ( |
MaskAnnotation
The mask based segmentation annotation.
maskGcsUristring
Google Cloud Storage URI that points to the mask image. The image must be in PNG format. It must have the same size as the DataItem's image. Each pixel in the image mask represents the AnnotationSpec which the pixel in the image DataItem belong to. Each color is mapped to one AnnotationSpec based on annotationSpecColors.
The mapping between color and AnnotationSpec for this Annotation.
| JSON representation |
|---|
{
"maskGcsUri": string,
"annotationSpecColors": [
{
object ( |
PolygonAnnotation
Represents a polygon in image.
The vertexes are connected one by one and the last vertex is connected to the first one to represent a polygon.
annotationSpecIdstring
The resource id of the AnnotationSpec that this Annotation pertains to.
displayNamestring
The display name of the AnnotationSpec that this Annotation pertains to.
| JSON representation |
|---|
{
"vertexes": [
{
object ( |
Vertex
Represents a 2D point in the image. Vertex coordinates are normalized to be relative to the original image dimensions and range from 0 to 1. The origin of the coordinate system (0,0) is the top-left corner of the image. x increases to the right, and y increases to the bottom.
xnumber
X coordinate of the vertex, normalized to [0.0, 1.0].
ynumber
Y coordinate of the vertex, normalized to [0.0, 1.0].
| JSON representation |
|---|
{ "x": number, "y": number } |
PolylineAnnotation
Represents a polyline in image.
The vertexes are connected one by one and the last vertex in not connected to the first one.
annotationSpecIdstring
The resource id of the AnnotationSpec that this Annotation pertains to.
displayNamestring
The display name of the AnnotationSpec that this Annotation pertains to.
| JSON representation |
|---|
{
"vertexes": [
{
object ( |