gcloud alpha ml vision detect-product

gcloud alpha ml vision detect-product - detect products within an image
gcloud alpha ml vision detect-product IMAGE_PATH --category=[CATEGORY,…] (--product-set=PRODUCT_SET : --product-set-location=PRODUCT_SET_LOCATION) [--bounding-polygon=BOUNDING_POLYGON] [--filter=FILTER] [--max-results=MAX_RESULTS] [GCLOUD_WIDE_FLAG]
(ALPHA) detect products within an image
Path to the image to be analyzed. This can be either a local path or a URL. If you provide a local file, the contents will be sent directly to Google Cloud Vision. If you provide a URL, it must be in Google Cloud Storage format (gs://bucket/object) or an HTTP URL (http://... or https://…)
Product category to search in. CATEGORY must be one of: apparel, homegoods, toys.
Product set resource - The product set to be searched for similar images. The arguments in this group can be used to specify the attributes of this resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways. To set the [project] attribute: provide the argument [--product-set] on the command line with a fully specified name; provide the argument [--project] on the command line; set the property [core/project]. This must be specified.
ID of the product set or fully qualified identifier for the product set. This flag must be specified if any of the other arguments in this group are specified.
The location of the product set.
Bounding polygon around the areas of interest in the image. If it is not specified, system discretion will be applied. A bounding polygon can be specified by a list of vertices or normalized vertices. A vertex (x, y) represents a 2D point in the image. x, y are integers and are in the same scale as the original image. The normalized vertex coordinates are relative to orginal image and range from 0 to 1. For example, --bounding-polygon=0.,0.,0.,0.3,0.3,0.,0.3,0.3 specifies a polygon with 4 normalized vertices - (0., 0.), (0., 0.3), (0.3, 0.), (0.3, 0.3). Notice that the decimal point is needed for normalized vertex coordindates.
Filter expression to restrict search results based on product labels. ANDs of ORs of key-value expressions are supported, where expressions within an OR must have the same key. Expressions separated by AND must have different keys. An '=' should be used to connect the key and value. For example, '(color = red OR color = blue) AND brand = Google' is acceptable, but not '(color = red OR brand = Google)' or 'color: red'.
Maximum number of results to be provided.
These flags are available to all commands: --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

This command uses the vision/v1 API. The full documentation for this API can be found at: https://cloud.google.com/vision/
To detect product in image 'gs://my-bucket/my-image.jpg' by searching in product set 'my-product-set', in category 'toys', run:
gcloud alpha ml vision detect-product  gs://my-bucket/my-image.jpg --product-set='my-product-set'  --product-set-location=us-east1 --category='toys'
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you may be trying to access an API with an invitation-only early access allowlist. This variant is also available:
gcloud beta ml vision detect-product