- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- ExamplePayload
- AnnotationPayload
- ClassificationAnnotation
- VideoObjectTrackingAnnotation
- BoundingPoly
- NormalizedVertex
Not used for AutoML Video Intelligence Object Tracking.
HTTP request
POST https://automl.googleapis.com/v1beta1/{name}:predict
Path parameters
Parameters | |
---|---|
name |
Name of the model requested to serve the prediction. Authorization requires the following Google IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{
"payload": {
object( |
Fields | |
---|---|
payload |
Required. Payload to perform a prediction on. The payload must match the problem type that the model was trained to solve. |
params |
Additional domain-specific parameters, any string must be up to 25000 characters long. |
Response body
If successful, the response body contains data with the following structure:
Response message for PredictionService.Predict
.
JSON representation | |
---|---|
{
"payload": [
{
object( |
Fields | |
---|---|
payload[] |
Prediction result. |
metadata |
Additional domain-specific prediction response metadata. |
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
ExamplePayload
Example data used for training or prediction.
AnnotationPayload
Contains annotation information that is relevant to AutoML.
JSON representation | |
---|---|
{ "annotationSpecId": string, "displayName": string, // Union field |
Fields | ||
---|---|---|
annotationSpecId |
Output only . The resource ID of the annotation spec that this annotation pertains to. The annotation spec comes from either an ancestor dataset, or the dataset that was used to train the model in use. |
|
displayName |
Output only. The value of |
|
Union field detail . Output only . Additional information about the annotation specific to the AutoML domain. detail can be only one of the following: |
||
classification |
Not used for AutoML Video Intelligence Object Tracking. |
|
videoObjectTracking |
Annotation details for object tracking predictions. |
ClassificationAnnotation
Contains annotation details specific to classification.
JSON representation | |
---|---|
{ "score": number } |
Fields | |
---|---|
score |
Output only. A confidence estimate between 0.0 and 1.0. A higher value means greater confidence that the annotation is positive. If a user approves an annotation as negative or positive, the score value remains unchanged. If a user creates an annotation, the score is 0 for negative or 1 for positive. |
VideoObjectTrackingAnnotation
Annotation details for video object tracking.
JSON representation | |
---|---|
{
"instanceId": string,
"timeOffset": string,
"boundingBox": {
object( |
Fields | |
---|---|
instanceId |
Optional. The instance of the object, expressed as a positive integer. Used to tell apart objects of the same type (i.e. AnnotationSpec) when multiple are present on a single example. NOTE: Instance ID prediction quality is not a part of model evaluation and is done as best effort. Especially in cases when an entity goes off-screen for a longer time (minutes), when it comes back it may be given a new instance ID. |
timeOffset |
Required. A time (frame) of a video to which this annotation pertains. Represented as the duration since the video's start. A duration in seconds with up to nine fractional digits, terminated by ' |
boundingBox |
Required. The rectangle representing the object location on the frame (i.e. at the timeOffset of the video). |
score |
Output only. The confidence that this annotation is positive for the video at the timeOffset, value in [0, 1], higher means higher positivity confidence. For annotations created by the user the score is 1. When user approves an annotation, the original float score is kept (and not changed to 1). |
BoundingPoly
A bounding polygon of a detected object on a plane. On output both vertices and normalizedVertices are provided. The polygon is formed by connecting vertices in the order they are listed.
JSON representation | |
---|---|
{
"normalizedVertices": [
{
object( |
Fields | |
---|---|
normalizedVertices[] |
Output only . The bounding polygon normalized vertices. |
NormalizedVertex
A vertex represents a 2D point in the image. The normalized vertex coordinates are between 0 to 1 fractions relative to the original plane (image, video). E.g. if the plane (e.g. whole image) would have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would be at the position (1, 6) on that plane.
JSON representation | |
---|---|
{ "x": number, "y": number } |
Fields | |
---|---|
x |
Required. Horizontal coordinate. |
y |
Required. Vertical coordinate. |