Class: Google::Apis::VisionV1::EntityAnnotation
- Inherits:
-
Object
- Object
- Google::Apis::VisionV1::EntityAnnotation
- Includes:
- Core::Hashable
- Defined in:
- lib/google/apis/vision_v1/classes.rb,
lib/google/apis/vision_v1/representations.rb,
lib/google/apis/vision_v1/representations.rb
Overview
Set of detected entity features.
Defined Under Namespace
Classes: Representation
Instance Attribute Summary collapse
-
#bounding_poly ⇒ Google::Apis::VisionV1::BoundingPoly
A bounding polygon for the detected image annotation.
-
#confidence ⇒ Float
The accuracy of the entity recognition in an image.
-
#description ⇒ String
Entity textual description, expressed in its
localelanguage. -
#locale ⇒ String
The language code for the locale in which the entity textual
description(next field) is expressed. -
#locations ⇒ Array<Google::Apis::VisionV1::LocationInfo>
The location information for the recognized entity.
-
#mid ⇒ String
Knowledge Graph entity ID.
-
#properties ⇒ Array<Google::Apis::VisionV1::Property>
Some entities can have additional optional
Propertyfields. -
#score ⇒ Float
Overall score of the result.
-
#topicality ⇒ Float
The relevancy of the ICA (Image Content Annotation) label to the image.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EntityAnnotation
constructor
A new instance of EntityAnnotation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ EntityAnnotation
Returns a new instance of EntityAnnotation.
776 777 778 |
# File 'lib/google/apis/vision_v1/classes.rb', line 776 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bounding_poly ⇒ Google::Apis::VisionV1::BoundingPoly
A bounding polygon for the detected image annotation. Corresponds to the JSON property ‘boundingPoly`
758 759 760 |
# File 'lib/google/apis/vision_v1/classes.rb', line 758 def bounding_poly @bounding_poly end |
#confidence ⇒ Float
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`
774 775 776 |
# File 'lib/google/apis/vision_v1/classes.rb', line 774 def confidence @confidence end |
#description ⇒ String
Entity textual description, expressed in its locale language. Corresponds to the JSON property ‘description`
727 728 729 |
# File 'lib/google/apis/vision_v1/classes.rb', line 727 def description @description end |
#locale ⇒ String
The language code for the locale in which the entity textual description (next field) is expressed. Corresponds to the JSON property ‘locale`
742 743 744 |
# File 'lib/google/apis/vision_v1/classes.rb', line 742 def locale @locale end |
#locations ⇒ Array<Google::Apis::VisionV1::LocationInfo>
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`
767 768 769 |
# File 'lib/google/apis/vision_v1/classes.rb', line 767 def locations @locations end |
#mid ⇒ String
Knowledge Graph entity ID. Maps to a freebase entity ID. (for example, “Google” maps to: mid /m/045c7b). Corresponds to the JSON property ‘mid`
722 723 724 |
# File 'lib/google/apis/vision_v1/classes.rb', line 722 def mid @mid end |
#properties ⇒ Array<Google::Apis::VisionV1::Property>
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`
748 749 750 |
# File 'lib/google/apis/vision_v1/classes.rb', line 748 def properties @properties end |
#score ⇒ Float
Overall score of the result. Range [0, 1]. Corresponds to the JSON property ‘score`
753 754 755 |
# File 'lib/google/apis/vision_v1/classes.rb', line 753 def score @score end |
#topicality ⇒ Float
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`
736 737 738 |
# File 'lib/google/apis/vision_v1/classes.rb', line 736 def topicality @topicality end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
781 782 783 784 785 786 787 788 789 790 791 |
# 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 |