Class: Google::Cloud::Vision::V1::ProductSearchResults

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/vision/v1/product_search.rb

Overview

Results for a product search request.

Defined Under Namespace

Classes: GroupedResult, ObjectAnnotation, Result

Instance Attribute Summary collapse

Instance Attribute Details

#index_time::Google::Protobuf::Timestamp

Returns Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.

Returns:

  • (::Google::Protobuf::Timestamp)

    Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'proto_docs/google/cloud/vision/v1/product_search.rb', line 74

class ProductSearchResults
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Information about a product.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Vision::V1::Product]
  #     The Product.
  # @!attribute [rw] score
  #   @return [::Float]
  #     A confidence level on the match, ranging from 0 (no confidence) to
  #     1 (full confidence).
  # @!attribute [rw] image
  #   @return [::String]
  #     The resource name of the image from the product that is the closest match
  #     to the query.
  class Result
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Prediction for what the object in the bounding box is.
  # @!attribute [rw] mid
  #   @return [::String]
  #     Object ID that should align with EntityAnnotation mid.
  # @!attribute [rw] language_code
  #   @return [::String]
  #     The BCP-47 language code, such as "en-US" or "sr-Latn". For more
  #     information, see
  #     http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
  # @!attribute [rw] name
  #   @return [::String]
  #     Object name, expressed in its `language_code` language.
  # @!attribute [rw] score
  #   @return [::Float]
  #     Score of the result. Range [0, 1].
  class ObjectAnnotation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information about the products similar to a single product in a query
  # image.
  # @!attribute [rw] bounding_poly
  #   @return [::Google::Cloud::Vision::V1::BoundingPoly]
  #     The bounding polygon around the product detected in the query image.
  # @!attribute [rw] results
  #   @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>]
  #     List of results, one for each product match.
  # @!attribute [rw] object_annotations
  #   @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::ObjectAnnotation>]
  #     List of generic predictions for the object in the bounding box.
  class GroupedResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#product_grouped_results::Array<::Google::Cloud::Vision::V1::ProductSearchResults::GroupedResult>

Returns List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.

Returns:

  • (::Array<::Google::Cloud::Vision::V1::ProductSearchResults::GroupedResult>)

    List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'proto_docs/google/cloud/vision/v1/product_search.rb', line 74

class ProductSearchResults
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Information about a product.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Vision::V1::Product]
  #     The Product.
  # @!attribute [rw] score
  #   @return [::Float]
  #     A confidence level on the match, ranging from 0 (no confidence) to
  #     1 (full confidence).
  # @!attribute [rw] image
  #   @return [::String]
  #     The resource name of the image from the product that is the closest match
  #     to the query.
  class Result
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Prediction for what the object in the bounding box is.
  # @!attribute [rw] mid
  #   @return [::String]
  #     Object ID that should align with EntityAnnotation mid.
  # @!attribute [rw] language_code
  #   @return [::String]
  #     The BCP-47 language code, such as "en-US" or "sr-Latn". For more
  #     information, see
  #     http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
  # @!attribute [rw] name
  #   @return [::String]
  #     Object name, expressed in its `language_code` language.
  # @!attribute [rw] score
  #   @return [::Float]
  #     Score of the result. Range [0, 1].
  class ObjectAnnotation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information about the products similar to a single product in a query
  # image.
  # @!attribute [rw] bounding_poly
  #   @return [::Google::Cloud::Vision::V1::BoundingPoly]
  #     The bounding polygon around the product detected in the query image.
  # @!attribute [rw] results
  #   @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>]
  #     List of results, one for each product match.
  # @!attribute [rw] object_annotations
  #   @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::ObjectAnnotation>]
  #     List of generic predictions for the object in the bounding box.
  class GroupedResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#results::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>

Returns List of results, one for each product match.

Returns:



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'proto_docs/google/cloud/vision/v1/product_search.rb', line 74

class ProductSearchResults
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Information about a product.
  # @!attribute [rw] product
  #   @return [::Google::Cloud::Vision::V1::Product]
  #     The Product.
  # @!attribute [rw] score
  #   @return [::Float]
  #     A confidence level on the match, ranging from 0 (no confidence) to
  #     1 (full confidence).
  # @!attribute [rw] image
  #   @return [::String]
  #     The resource name of the image from the product that is the closest match
  #     to the query.
  class Result
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Prediction for what the object in the bounding box is.
  # @!attribute [rw] mid
  #   @return [::String]
  #     Object ID that should align with EntityAnnotation mid.
  # @!attribute [rw] language_code
  #   @return [::String]
  #     The BCP-47 language code, such as "en-US" or "sr-Latn". For more
  #     information, see
  #     http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
  # @!attribute [rw] name
  #   @return [::String]
  #     Object name, expressed in its `language_code` language.
  # @!attribute [rw] score
  #   @return [::Float]
  #     Score of the result. Range [0, 1].
  class ObjectAnnotation
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Information about the products similar to a single product in a query
  # image.
  # @!attribute [rw] bounding_poly
  #   @return [::Google::Cloud::Vision::V1::BoundingPoly]
  #     The bounding polygon around the product detected in the query image.
  # @!attribute [rw] results
  #   @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::Result>]
  #     List of results, one for each product match.
  # @!attribute [rw] object_annotations
  #   @return [::Array<::Google::Cloud::Vision::V1::ProductSearchResults::ObjectAnnotation>]
  #     List of generic predictions for the object in the bounding box.
  class GroupedResult
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end