在控制台中建構應用程式

瞭解如何在Google Cloud 控制台中建立簡易的 Vertex AI Vision 物件偵測工具應用程式。


如要直接在 Google Cloud 控制台按照逐步指南操作,請按一下「Guide me」(逐步引導)

逐步引導


事前準備

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Vision AI API.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Vision AI API.

    Enable the API

  8. 建立物件偵測應用程式

    設定環境後,即可建立應用程式。

    在 Google Cloud 控制台中,應用程式會以圖表形式呈現。此外,在 Vertex AI Vision 中,應用程式圖表必須至少有兩個節點:影片來源節點 (串流),以及至少一個節點 (處理模型或輸出目的地)。

    建立空白的應用程式

    您必須先建立空白應用程式,才能填入應用程式圖表。

    控制台

    在 Google Cloud 控制台中建立應用程式。

    1. 開啟 Vertex AI Vision 資訊主頁的「應用程式」分頁。

      前往「應用程式」分頁

    2. 按一下「建立」按鈕。

    3. 輸入 quickstart-app 做為應用程式名稱,然後選擇您所在的地區。

    4. 點選「建立」

    新增應用程式元件節點

    建立空白應用程式後,您可以在應用程式圖表中新增三個節點:可接收串流資料的擷取節點、對資料執行電腦圖像工作的處理節點,以及資料目的地節點 (本例為資料倉儲目的地)。

    控制台

    在管理中心將元件節點新增至應用程式。

    1. 開啟 Vertex AI Vision 資訊主頁的「應用程式」分頁。

      前往「應用程式」分頁

    2. quickstart-app 行中,選取「查看圖表」。這會將您導向至處理管道的圖表視覺化畫面。

    新增資料匯入節點

    1. 如要新增輸入串流節點,請在側邊選單的「Connectors」(連接器) 區段中選取「Streams」(串流) 選項。

    2. 在隨即開啟的「Stream」(串流) 選單中,選取「Source」(來源) 區段的 「Add Stream」(新增串流)

    3. 在「新增串流」選單中,選擇「註冊新串流」,然後新增 quickstart-stream 做為串流名稱。

    4. 如要將串流新增至應用程式圖表,請按一下「新增串流」

    新增資料處理節點

    1. 如要新增物件偵測器模型節點,請在側邊選單的「Pre-trained models」(預先訓練模型) 區段中,選取「Object detector」(物件偵測器) 選項。

      在 UI 中新增物件偵測器模型

    新增資料儲存節點

    1. 如要新增輸出目的地 (儲存空間) 節點,請在側邊選單的「Connectors」(連接器) 區段中選取「Vertex AI Vision's Media Warehouse」(Vertex AI Vision 的媒體倉儲) 選項。

    2. 在「Vertex AI Vision's Media Warehouse」(Vertex AI Vision 媒體倉儲) 選單中,按一下「Connect warehouse」(連結倉儲)

    3. 在「Connect Warehouse」(連結倉儲) 選單中,選取 「Create new warehouse」(新建倉儲)。將倉儲命名為 quickstart-warehouse,並將 TTL 持續時間保留 14 天。

    4. 按一下「Create」(建立) 按鈕來新增倉儲。

      UI 中的物件偵測工具應用程式圖表

    部署應用程式以供使用

    使用所有必要元件建構端對端應用程式後,最後一個步驟就是部署應用程式。

    控制台

    1. 開啟 Vertex AI Vision 資訊主頁的「應用程式」分頁。

      前往「應用程式」分頁

    2. 在清單中,選取 quickstart-app 應用程式旁邊的「查看圖表」

    3. 在應用程式圖表建構工具頁面中,按一下「部署」按鈕。

    4. 在隨即顯示的確認對話方塊中,選取「Deploy」

      部署作業可能需要幾分鐘才能完成。部署作業完成後,節點旁會顯示綠色勾號。

      UI 中已部署的應用程式

    恭喜!您剛建立並部署了第一個 Vertex AI Vision 應用程式。建立及部署應用程式是使用 Vertex AI Vision 擷取及使用處理後媒體資料的第一步。

    清除所用資源

    如要避免系統向您的 Google Cloud 帳戶收取本快速入門所用資源的費用,請刪除含有相關資源的專案,或者保留專案但刪除個別資源。

    刪除專案

    1. In the Google Cloud console, go to the Manage resources page.

      Go to Manage resources

    2. In the project list, select the project that you want to delete, and then click Delete.
    3. In the dialog, type the project ID, and then click Shut down to delete the project.

    刪除個別資源

    刪除倉庫

    1. In the Google Cloud console, go to the Warehouses page.

      Go to the Warehouses tab

    2. Locate your quickstart-warehouse warehouse.
    3. To delete the warehouse, click Actions, click Delete warehouse, and then follow the instructions.

    刪除串流

    1. In the Google Cloud console, go to the Streams page.

      Go to the Streams tab

    2. Locate your quickstart-stream stream.
    3. To delete the stream, click Actions, click Delete stream, and then follow the instructions.

    刪除應用程式

    1. In the Google Cloud console, go to the Applications page.

      Go to the Applications tab

    2. Locate your quickstart-app app.
    3. To delete the app, click Actions, click Delete application, and then follow the instructions.

    後續步驟