ApplicationConfigs

儲存應用程式圖表的訊息。

JSON 表示法
{
  "nodes": [
    {
      object (Node)
    }
  ]
}
欄位
nodes[]

object (Node)

應用程式圖表中的節點清單。

節點

說明節點物件的訊息。

JSON 表示法
{
  "name": string,
  "displayName": string,
  "nodeConfig": {
    object (ProcessorConfig)
  },
  "processor": string,
  "parents": [
    {
      object (InputEdge)
    }
  ],

  // Union field stream_output_config can be only one of the following:
  "outputAllOutputChannelsToStream": boolean
  // End of list of possible types for union field stream_output_config.
}
欄位
name

string

這是必要旗標,節點的專屬名稱。

displayName

string

節點的使用者友善顯示名稱。

nodeConfig

object (ProcessorConfig)

節點設定。

processor

string

處理器名稱是指所選處理器資源。

parents[]

object (InputEdge)

父項節點。輸入節點不得有父項節點。在 V1 Alpha1/Beta 中,只有媒體倉儲節點可以有多個父項,其他類型的節點只能有一個父項。

聯集欄位 stream_output_config

stream_output_config 只能是下列其中一項:

outputAllOutputChannelsToStream

boolean

根據預設,節點的輸出內容只會提供給下游節點。如要使用應用程式節點的直接輸出內容,輸出內容必須先傳送至 Vision AI Streams。

將 outputAllOutputChannelsToStream 設為 true 後,App Platform 會自動將目前節點的所有輸出內容傳送至 Vision AI 串流資源 (每個輸出頻道一個串流)。在部署期間,App Platform 會自動建立輸出串流資源,並在應用程式取消部署後刪除。請注意,這項設定會套用至所有應用程式執行個體。

您可以設定執行個體資源的 outputResources 區段,在執行個體層級覆寫輸出串流。producerNode 應為目前節點,outputResourceBinding 應為輸出頻道名稱 (如果處理器只有 1 個輸出頻道,則留空即可),而 outputResource 應為目標輸出串流。

ProcessorConfig

下一個 ID:28

JSON 表示法
{

  // Union field processor_config can be only one of the following:
  "videoStreamInputConfig": {
    object (VideoStreamInputConfig)
  },
  "aiEnabledDevicesInputConfig": {
    object (AIEnabledDevicesInputConfig)
  },
  "mediaWarehouseConfig": {
    object (MediaWarehouseConfig)
  },
  "personBlurConfig": {
    object (PersonBlurConfig)
  },
  "occupancyCountConfig": {
    object (OccupancyCountConfig)
  },
  "personVehicleDetectionConfig": {
    object (PersonVehicleDetectionConfig)
  },
  "vertexAutomlVisionConfig": {
    object (VertexAutoMLVisionConfig)
  },
  "vertexAutomlVideoConfig": {
    object (VertexAutoMLVideoConfig)
  },
  "vertexCustomConfig": {
    object (VertexCustomConfig)
  },
  "generalObjectDetectionConfig": {
    object (GeneralObjectDetectionConfig)
  },
  "bigQueryConfig": {
    object (BigQueryConfig)
  },
  "personalProtectiveEquipmentDetectionConfig": {
    object (PersonalProtectiveEquipmentDetectionConfig)
  }
  // End of list of possible types for union field processor_config.
}
欄位

聯集欄位 processor_config

processor_config 只能是下列其中一項:

videoStreamInputConfig

object (VideoStreamInputConfig)

串流輸入處理器的設定。

aiEnabledDevicesInputConfig

object (AIEnabledDevicesInputConfig)

支援 AI 技術的輸入裝置設定。

mediaWarehouseConfig

object (MediaWarehouseConfig)

媒體倉儲處理器的設定。

personBlurConfig

object (PersonBlurConfig)

人物模糊處理器的設定。

occupancyCountConfig

object (OccupancyCountConfig)

使用率計數器處理器的設定。

personVehicleDetectionConfig

object (PersonVehicleDetectionConfig)

人車偵測處理器的設定。

vertexAutomlVisionConfig

object (VertexAutoMLVisionConfig)

Vertex AutoML 視覺處理器的設定。

vertexAutomlVideoConfig

object (VertexAutoMLVideoConfig)

Vertex AutoML 影片處理器的設定。

vertexCustomConfig

object (VertexCustomConfig)

Vertex 自訂處理器的設定。

generalObjectDetectionConfig

object (GeneralObjectDetectionConfig)

一般物件偵測處理器的設定。

bigQueryConfig

object (BigQueryConfig)

BigQuery 處理器的設定。

personalProtectiveEquipmentDetectionConfig

object (PersonalProtectiveEquipmentDetectionConfig)

personalProtectiveEquipmentDetectionConfig 的設定

VideoStreamInputConfig

說明影片串流輸入設定的訊息。這則訊息僅應做為內建:串流輸入處理器的預留位置,實際的串流繫結應使用對應的 API 指定。

JSON 表示法
{
  "streams": [
    string
  ],
  "streamsWithAnnotation": [
    {
      object (StreamWithAnnotation)
    }
  ]
}
欄位
streams[]
(deprecated)

string

streamsWithAnnotation[]
(deprecated)

object (StreamWithAnnotation)

AIEnabledDevicesInputConfig

說明支援 AI 的裝置輸入設定的訊息。

MediaWarehouseConfig

說明 MediaWarehouseConfig 的訊息。

JSON 表示法
{
  "corpus": string,
  "region": string,
  "ttl": string
}
欄位
corpus

string

媒體倉儲語料庫的資源名稱。格式:projects/${projectId}/locations/${locationId}/corpora/${corpus_id}

region
(deprecated)

string

已淘汰。

ttl

string (Duration format)

所有媒體素材資源、相關中繼資料和搜尋文件的有效時間。

以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s」,例如:"3.5s"

PersonBlurConfig

說明 FaceBlurConfig 的訊息。

JSON 表示法
{
  "personBlurType": enum (PersonBlurType),
  "facesOnly": boolean
}
欄位
personBlurType

enum (PersonBlurType)

人物模糊處理類型。

facesOnly

boolean

是否只模糊處理器中人物臉孔以外的物件。

PersonBlurType

人像模糊處理類型

列舉
PERSON_BLUR_TYPE_UNSPECIFIED 人像模糊處理類型為「UNSPECIFIED」。
FULL_OCCULUSION FaceBlur 類型為完全遮蔽。
BLUR_FILTER 臉部模糊處理類型模糊處理篩選器。

OccupancyCountConfig

說明 OccupancyCountConfig 的訊息。

JSON 表示法
{
  "enablePeopleCounting": boolean,
  "enableVehicleCounting": boolean,
  "enableDwellingTimeTracking": boolean
}
欄位
enablePeopleCounting

boolean

是否要計算人物出現次數,輸出計數時的鍵為「people」。

enableVehicleCounting

boolean

是否要計算車輛的出現次數,輸出計數時的鍵為「vehicle」。

enableDwellingTimeTracking

boolean

是否要追蹤各個物體在場景或特定區域內逗留的時間。

PersonVehicleDetectionConfig

說明 PersonVehicleDetectionConfig 的訊息。

JSON 表示法
{
  "enablePeopleCounting": boolean,
  "enableVehicleCounting": boolean
}
欄位
enablePeopleCounting

boolean

至少須將 enablePeopleCounting 和 enableVehicleCounting 欄位設為 true。是否要計算人物出現次數,輸出計數時的鍵為「people」。

enableVehicleCounting

boolean

是否要計算車輛的出現次數,輸出計數時的鍵為「vehicle」。

VertexAutoMLVisionConfig

Vertex AutoML Vision 處理器的設定訊息。

JSON 表示法
{
  "confidenceThreshold": number,
  "maxPredictions": integer
}
欄位
confidenceThreshold

number

系統只會傳回分數高於閾值的實體。值 0.0 表示傳回所有偵測到的實體。

maxPredictions

integer

每個輸出影格最多會傳回這麼多預測結果。值為 0 表示傳回所有偵測到的實體。

VertexAutoMLVideoConfig

說明 VertexAutoMLVideoConfig 的訊息。

JSON 表示法
{
  "confidenceThreshold": number,
  "blockedLabels": [
    string
  ],
  "maxPredictions": integer,
  "boundingBoxSizeLimit": number
}
欄位
confidenceThreshold

number

系統只會傳回分數高於閾值的實體。值為 0.0 表示會傳回所有偵測到的實體。

blockedLabels[]

string

系統不會傳回這個欄位中指定的標籤。

maxPredictions

integer

每個輸出影格最多會傳回這麼多預測結果。值為 0 表示傳回所有偵測到的實體。

boundingBoxSizeLimit

number

系統只會傳回大小超過此限制的定界框。僅限物件追蹤。值 0.0 表示傳回所有偵測到的實體。

VertexCustomConfig

說明 VertexCustomConfig 的訊息。

JSON 表示法
{
  "maxPredictionFps": integer,
  "dedicatedResources": {
    object (DedicatedResources)
  },
  "postProcessingCloudFunction": string,
  "attachApplicationMetadata": boolean
}
欄位
maxPredictionFps

integer

每秒的最大預測影格數。這個屬性可設定運算子傳送預測要求至 Vertex AI 端點的速度。預設值為 0,表示未設有預測每秒影格數上限。運算子會以輸入 FPS 傳送預測要求。

dedicatedResources

object (DedicatedResources)

說明專屬於 DeployedModel 的資源,以及需要更高程度手動設定的資源。

postProcessingCloudFunction

string

如果不為空白,系統會將預測結果傳送至指定的雲端函式,以便後續處理。* Cloud 函式會收到 AppPlatformCloudFunctionRequest,其中註解欄位會是 proto PredictResponse 的 JSON 格式。* Cloud 函式應傳回 AppPlatformCloudFunctionResponse,並將 PredictResponse 儲存在註解欄位中。* 如要捨棄預測輸出內容,請在傳回的 AppPlatformCloudFunctionResponse 中清除酬載欄位。

attachApplicationMetadata

boolean

如果為 true,自訂模型收到的預測要求也會包含以下結構描述的中繼資料:'appPlatformMetadata': { 'ingestionTime': DOUBLE; (UNIX 時間戳記) 'application': STRING; 'instanceId': STRING; 'node': STRING; 'processor': STRING; }

DedicatedResources

說明專屬於 DeployedModel 的資源,以及需要更高程度手動設定的資源。

JSON 表示法
{
  "machineSpec": {
    object (MachineSpec)
  },
  "minReplicaCount": integer,
  "maxReplicaCount": integer,
  "autoscalingMetricSpecs": [
    {
      object (AutoscalingMetricSpec)
    }
  ]
}
欄位
machineSpec

object (MachineSpec)

這是必要旗標,不可變動。預測作業使用的單一機器規格。

minReplicaCount

integer

這是必要旗標,不可變動。無論何時,這個 DeployedModel 一律會部署於這個數量的機器備用資源。這個值必須大於或等於 1。

如果 DeployedModel 的流量增加,系統可能會動態將其部署至更多副本,而隨著流量減少,部分額外副本可能會釋放。

maxReplicaCount

integer

不可變動。當 DeployedModel 的流量增加時,可部署於的備用資源數量上限。如果要求的值過大,部署作業就會發生錯誤,但如果部署成功,則可保證模型可擴充至該數量的複本 (除非服務中斷)。如果 DeployedModel 的流量超過副本可處理的最大值,系統就會捨棄部分流量。如果未提供這個值,系統會使用 minReplicaCount 做為預設值。

這個欄位的值會影響對 Vertex CPU 和 GPU 配額的收費。具體來說,您將需要為 maxReplicaCount * 所選機器類型的核心數,以及 maxReplicaCount * 所選機器類型中每個複本的 GPU 數量付費。

autoscalingMetricSpecs[]

object (AutoscalingMetricSpec)

不可變動。指標規格,用於覆寫資源使用率指標 (CPU 使用率、加速器的占空比等) 目標值 (如果未設定,預設為 60)。每個指標最多只能有一個項目。

如果 machineSpec.accelerator_count 大於 0,自動調整大小功能會根據 CPU 使用率和加速器的占空比指標,並在任一指標超過目標值時擴大規模,如果兩個指標都低於目標值時則縮減規模。兩個指標的預設目標值皆為 60。

如果 machineSpec.accelerator_count 為 0,則自動調度資源功能只會根據 CPU 使用率指標 (如果未明確設定,則預設目標值為 60) 進行自動調度資源。

舉例來說,如果您要將線上預測的目標 CPU 使用率覆寫為 80,請將 autoscalingMetricSpecs.metric_name 設為 aiplatform.googleapis.com/prediction/online/cpu/utilization,並將 autoscalingMetricSpecs.target 設為 80

MachineSpec

單一機器的規格。

JSON 表示法
{
  "machineType": string,
  "acceleratorType": enum (AcceleratorType),
  "acceleratorCount": integer
}
欄位
machineType

string

不可變動。機器類型。

請參閱預測功能支援的機器類型清單

請參閱支援自訂訓練的機器類型清單

對於 [DeployedModel][] 而言,這個欄位為選填,預設值為 n1-standard-2。這是 [BatchPredictionJob][] 或 [WorkerPoolSpec][] 的必填欄位。

acceleratorType

enum (AcceleratorType)

不可變動。根據 acceleratorCount 附加至機器的加速器類型。

acceleratorCount

integer

要附加至機器的加速器數量。

AcceleratorType

代表硬體加速器類型。

列舉
ACCELERATOR_TYPE_UNSPECIFIED 未指定加速器類型,也就是沒有加速器。
NVIDIA_TESLA_K80 Nvidia Tesla K80 GPU。
NVIDIA_TESLA_P100 Nvidia Tesla P100 GPU。
NVIDIA_TESLA_V100 Nvidia Tesla V100 GPU。
NVIDIA_TESLA_P4 Nvidia Tesla P4 GPU。
NVIDIA_TESLA_T4 Nvidia Tesla T4 GPU。
NVIDIA_TESLA_A100 Nvidia Tesla A100 GPU。
TPU_V2 TPU v2。
TPU_V3 TPU v3。

AutoscalingMetricSpec

指標規格,定義用於計算所需複本數量的目標資源利用率 (CPU 利用率、加速器的占空比等)。

JSON 表示法
{
  "metricName": string,
  "target": integer
}
欄位
metricName

string

這是必要旗標,資源指標名稱。支援的指標:

  • 線上預測:
  • aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle
  • aiplatform.googleapis.com/prediction/online/cpu/utilization
target

integer

指定指標的目標資源使用率 (1% 至 100%);一旦實際使用率與目標的差異超過一定百分比,機器副本就會變更。如未提供,預設值為 60 (代表 60%)。

GeneralObjectDetectionConfig

一般物件偵測處理器的設定訊息。

BigQueryConfig

BigQuery 處理器的設定訊息。

JSON 表示法
{
  "table": string,
  "cloudFunctionMapping": {
    string: string,
    ...
  },
  "createDefaultTableIfNotExists": boolean
}
欄位
table

string

Vision AI Platform 用來擷取註解的 BigQuery 資料表資源。

cloudFunctionMapping

map (key: string, value: string)

資料結構定義:根據預設,Vision AI 應用程式會嘗試使用下列結構定義,將註解寫入目標 BigQuery 表格:

ingestion_time: TIMESTAMP,原始資料的擷取時間。

application:STRING,產生註解的應用程式名稱。

instance: STRING,產生註解的執行個體 ID。

node: STRING,產生註解的應用程式圖節點名稱。

annotation: 字串或 JSON,實際的註解 protobuf 會轉換為 JSON 字串,其中位元組欄位為 64 編碼字串。可寫入字串或 JSON 類型資料欄。

如要將註解資料轉送至現有的 BigQuery 資料表,客戶必須確保結構定義相容。這份對應會將應用程式節點名稱對應至相應的雲端函式端點,以便將註解直接轉換為 google.cloud.bigquery.storage.v1.AppendRowsRequest (應只設定 avro_rows 或 proto_rows)。如果已設定,則對應應用程式節點產生的註解會先傳送至 Cloud Function,再轉送至 BigQuery。

如果預設資料表結構定義不合適,客戶可以使用 CloudFunction 將 Vision AI 應用程式的註解輸出內容轉換為任意 BigQuery 資料表結構定義。* Cloud 函式會收到 AppPlatformCloudFunctionRequest,其中註解欄位會是 Vision AI 註解的 JSON 格式。* 雲端函式應傳回 AppPlatformCloudFunctionResponse,其中的附加資料要求儲存在註解欄位中。* 如要放棄註解,只要清除傳回的 AppPlatformCloudFunctionResponse 中的註解欄位即可。

包含 "key": value 組合清單的物件。範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

createDefaultTableIfNotExists

boolean

如果為 true,如果指定的資料表不存在,App Platform 會建立 BigQuery 資料集和 BigQuery 資料表,並使用預設結構定義。如果指定了任何雲端函式自訂結構定義,這項做法就無法運作,因為系統不瞭解您想要的結構定義。在 App Platform 建立的預設資料表中,會使用 JSON 欄。

PersonalProtectiveEquipmentDetectionConfig

說明 PersonalProtectiveEquipmentDetectionConfig 的訊息。

JSON 表示法
{
  "enableFaceCoverageDetection": boolean,
  "enableHeadCoverageDetection": boolean,
  "enableHandsCoverageDetection": boolean
}
欄位
enableFaceCoverageDetection

boolean

是否要啟用臉部遮蔽偵測功能。

enableHeadCoverageDetection

boolean

是否啟用頭部覆蓋偵測功能。

enableHandsCoverageDetection

boolean

是否啟用手部覆蓋偵測功能。

InputEdge

說明指向節點的一個邊的訊息。

JSON 表示法
{
  "parentNode": string,
  "parentOutputChannel": string,
  "connectedInputChannel": string
}
欄位
parentNode

string

父項節點的名稱。

parentOutputChannel

string

父節點的已連結輸出構件。如果目標處理器只有 1 個輸出構件,則可省略。

connectedInputChannel

string

目前節點處理器的已連結輸入管道。如果目標處理器只有 1 個輸入頻道,則可省略。