class Google::Apis::VisionV1::EntityAnnotation

Set of detected entity features.

Attributes

bounding_poly[RW]

A bounding polygon for the detected image annotation. Corresponds to the JSON property ‘boundingPoly` @return [Google::Apis::VisionV1::BoundingPoly]

confidence[RW]

The accuracy of the entity recognition in an image. For example, for an image containing ‘Eiffel Tower,’ this field represents the confidence that there is a tower in the query image. Range [0, 1]. Corresponds to the JSON property ‘confidence` @return [Float]

description[RW]

Entity textual description, expressed in its locale language. Corresponds to the JSON property ‘description` @return [String]

locale[RW]

The language code for the locale in which the entity textual description (next field) is expressed. Corresponds to the JSON property ‘locale` @return [String]

locations[RW]

The location information for the recognized entity. Multiple LocationInfo elements can be present since one location may indicate the location of the scene in the query image, and another the location of the place where the query image was taken. Location information is usually present for landmarks. Corresponds to the JSON property ‘locations` @return [Array<Google::Apis::VisionV1::LocationInfo>]

mid[RW]

Knowledge Graph entity ID. Maps to a freebase entity ID. (for example, “Google” maps to: mid /m/045c7b). Corresponds to the JSON property ‘mid` @return [String]

properties[RW]

Some entities can have additional optional Property fields. For example a different kind of score or string that qualifies the entity. Corresponds to the JSON property ‘properties` @return [Array<Google::Apis::VisionV1::Property>]

score[RW]

Overall score of the result. Range [0, 1]. Corresponds to the JSON property ‘score` @return [Float]

topicality[RW]

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of ‘tower’ to an image containing ‘Eiffel Tower’ is likely higher than an image containing a distant towering building, though the confidence that there is a tower may be the same. Range [0, 1]. Corresponds to the JSON property ‘topicality` @return [Float]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/vision_v1/classes.rb, line 776
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/vision_v1/classes.rb, line 781
def update!(**args)
  @mid = args[:mid] if args.key?(:mid)
  @description = args[:description] if args.key?(:description)
  @topicality = args[:topicality] if args.key?(:topicality)
  @locale = args[:locale] if args.key?(:locale)
  @properties = args[:properties] if args.key?(:properties)
  @score = args[:score] if args.key?(:score)
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
  @locations = args[:locations] if args.key?(:locations)
  @confidence = args[:confidence] if args.key?(:confidence)
end