public final class EntityAnnotation extends GeneratedMessageV3 implements EntityAnnotationOrBuilder
Set of detected entity features.
Protobuf type google.cloud.vision.v1p4beta1.EntityAnnotation
Static Fields
BOUNDING_POLY_FIELD_NUMBER
public static final int BOUNDING_POLY_FIELD_NUMBER
Field Value
CONFIDENCE_FIELD_NUMBER
public static final int CONFIDENCE_FIELD_NUMBER
Field Value
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value
LOCALE_FIELD_NUMBER
public static final int LOCALE_FIELD_NUMBER
Field Value
LOCATIONS_FIELD_NUMBER
public static final int LOCATIONS_FIELD_NUMBER
Field Value
MID_FIELD_NUMBER
public static final int MID_FIELD_NUMBER
Field Value
PROPERTIES_FIELD_NUMBER
public static final int PROPERTIES_FIELD_NUMBER
Field Value
SCORE_FIELD_NUMBER
public static final int SCORE_FIELD_NUMBER
Field Value
TOPICALITY_FIELD_NUMBER
public static final int TOPICALITY_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static EntityAnnotation getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static EntityAnnotation.Builder newBuilder()
Returns
newBuilder(EntityAnnotation prototype)
public static EntityAnnotation.Builder newBuilder(EntityAnnotation prototype)
Parameter
Returns
public static EntityAnnotation parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static EntityAnnotation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static EntityAnnotation parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static EntityAnnotation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static EntityAnnotation parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static EntityAnnotation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EntityAnnotation parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static EntityAnnotation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static EntityAnnotation parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static EntityAnnotation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static EntityAnnotation parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static EntityAnnotation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<EntityAnnotation> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getBoundingPoly()
public BoundingPoly getBoundingPoly()
Image region to which this entity belongs. Not produced
for LABEL_DETECTION
features.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;
Returns
getBoundingPolyOrBuilder()
public BoundingPolyOrBuilder getBoundingPolyOrBuilder()
Image region to which this entity belongs. Not produced
for LABEL_DETECTION
features.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;
Returns
getConfidence() (deprecated)
public float getConfidence()
Deprecated. google.cloud.vision.v1p4beta1.EntityAnnotation.confidence is deprecated. See
google/cloud/vision/v1p4beta1/image_annotator.proto;l=478
Deprecated. Use score
instead.
The accuracy of the entity detection in an image.
For example, for an image in which the "Eiffel Tower" entity is detected,
this field represents the confidence that there is a tower in the query
image. Range [0, 1].
float confidence = 5 [deprecated = true];
Returns
Type | Description |
float | The confidence.
|
getDefaultInstanceForType()
public EntityAnnotation getDefaultInstanceForType()
Returns
getDescription()
public String getDescription()
Entity textual description, expressed in its locale
language.
string description = 3;
Returns
Type | Description |
String | The description.
|
getDescriptionBytes()
public ByteString getDescriptionBytes()
Entity textual description, expressed in its locale
language.
string description = 3;
Returns
Type | Description |
ByteString | The bytes for description.
|
getLocale()
public String getLocale()
The language code for the locale in which the entity textual
description
is expressed.
string locale = 2;
Returns
Type | Description |
String | The locale.
|
getLocaleBytes()
public ByteString getLocaleBytes()
The language code for the locale in which the entity textual
description
is expressed.
string locale = 2;
Returns
getLocations(int index)
public LocationInfo getLocations(int index)
The location information for the detected entity. Multiple
LocationInfo
elements can be present because one location may
indicate the location of the scene in the image, and another location
may indicate the location of the place where the image was taken.
Location information is usually present for landmarks.
repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;
Parameter
Returns
getLocationsCount()
public int getLocationsCount()
The location information for the detected entity. Multiple
LocationInfo
elements can be present because one location may
indicate the location of the scene in the image, and another location
may indicate the location of the place where the image was taken.
Location information is usually present for landmarks.
repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;
Returns
getLocationsList()
public List<LocationInfo> getLocationsList()
The location information for the detected entity. Multiple
LocationInfo
elements can be present because one location may
indicate the location of the scene in the image, and another location
may indicate the location of the place where the image was taken.
Location information is usually present for landmarks.
repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;
Returns
getLocationsOrBuilder(int index)
public LocationInfoOrBuilder getLocationsOrBuilder(int index)
The location information for the detected entity. Multiple
LocationInfo
elements can be present because one location may
indicate the location of the scene in the image, and another location
may indicate the location of the place where the image was taken.
Location information is usually present for landmarks.
repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;
Parameter
Returns
getLocationsOrBuilderList()
public List<? extends LocationInfoOrBuilder> getLocationsOrBuilderList()
The location information for the detected entity. Multiple
LocationInfo
elements can be present because one location may
indicate the location of the scene in the image, and another location
may indicate the location of the place where the image was taken.
Location information is usually present for landmarks.
repeated .google.cloud.vision.v1p4beta1.LocationInfo locations = 8;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder> | |
getMid()
Returns
getMidBytes()
public ByteString getMidBytes()
Returns
getParserForType()
public Parser<EntityAnnotation> getParserForType()
Returns
Overrides
getProperties(int index)
public Property getProperties(int index)
Some entities may have optional user-supplied Property
(name/value)
fields, such a score or string that qualifies the entity.
repeated .google.cloud.vision.v1p4beta1.Property properties = 9;
Parameter
Returns
getPropertiesCount()
public int getPropertiesCount()
Some entities may have optional user-supplied Property
(name/value)
fields, such a score or string that qualifies the entity.
repeated .google.cloud.vision.v1p4beta1.Property properties = 9;
Returns
getPropertiesList()
public List<Property> getPropertiesList()
Some entities may have optional user-supplied Property
(name/value)
fields, such a score or string that qualifies the entity.
repeated .google.cloud.vision.v1p4beta1.Property properties = 9;
Returns
getPropertiesOrBuilder(int index)
public PropertyOrBuilder getPropertiesOrBuilder(int index)
Some entities may have optional user-supplied Property
(name/value)
fields, such a score or string that qualifies the entity.
repeated .google.cloud.vision.v1p4beta1.Property properties = 9;
Parameter
Returns
getPropertiesOrBuilderList()
public List<? extends PropertyOrBuilder> getPropertiesOrBuilderList()
Some entities may have optional user-supplied Property
(name/value)
fields, such a score or string that qualifies the entity.
repeated .google.cloud.vision.v1p4beta1.Property properties = 9;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p4beta1.PropertyOrBuilder> | |
getScore()
Overall score of the result. Range [0, 1].
float score = 4;
Returns
Type | Description |
float | The score.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getTopicality()
public float getTopicality()
The relevancy of the ICA (Image Content Annotation) label to the
image. For example, the relevancy of "tower" is likely higher to an image
containing the detected "Eiffel Tower" than to an image containing a
detected distant towering building, even though the confidence that
there is a tower in each image may be the same. Range [0, 1].
float topicality = 6;
Returns
Type | Description |
float | The topicality.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasBoundingPoly()
public boolean hasBoundingPoly()
Image region to which this entity belongs. Not produced
for LABEL_DETECTION
features.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 7;
Returns
Type | Description |
boolean | Whether the boundingPoly field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public EntityAnnotation.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected EntityAnnotation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public EntityAnnotation.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions