在控制台中建構應用程式
瞭解如何在Google Cloud 控制台中建立簡易的 Vertex AI Vision 物件偵測工具應用程式。
如要直接在 Google Cloud 控制台按照逐步指南操作,請按一下「Guide me」(逐步引導):
事前準備
- 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.
- 
    
    
      
        In the Google Cloud console, on the project selector page, select or create a Google Cloud project. Roles required to select or create a project - Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- 
      Create a project: To create a project, you need the Project Creator
      (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
 
- 
  
    Verify that billing is enabled for your Google Cloud project. 
- 
  
  
    
      Enable the Vision AI API. Roles required to enable APIs To enable APIs, you need the Service Usage Admin IAM role ( roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.
- 
    
    
      
        In the Google Cloud console, on the project selector page, select or create a Google Cloud project. Roles required to select or create a project - Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- 
      Create a project: To create a project, you need the Project Creator
      (roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
 
- 
  
    Verify that billing is enabled for your Google Cloud project. 
- 
  
  
    
      Enable the Vision AI API. Roles required to enable APIs To enable APIs, you need the Service Usage Admin IAM role ( roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.
- 開啟 Vertex AI Vision 資訊主頁的「應用程式」分頁。 
- 按一下「建立」按鈕。 
- 輸入 - quickstart-app做為應用程式名稱,然後選擇您所在的地區。
- 點選「建立」。 
- 開啟 Vertex AI Vision 資訊主頁的「應用程式」分頁。 
- 在 - quickstart-app行中,選取「查看圖表」。這會將您導向至處理管道的圖表視覺化畫面。
- 如要新增輸入串流節點,請在側邊選單的「Connectors」(連接器) 區段中選取「Streams」(串流) 選項。 
- 在隨即開啟的「Stream」(串流) 選單中,選取「Source」(來源) 區段的 「Add Stream」(新增串流)。 
- 在「新增串流」選單中,選擇「註冊新串流」,然後新增 - quickstart-stream做為串流名稱。
- 如要將串流新增至應用程式圖表,請按一下「新增串流」。 
- 如要新增物件偵測器模型節點,請在側邊選單的「Pre-trained models」(預先訓練模型) 區段中,選取「Object detector」(物件偵測器) 選項。  
- 如要新增輸出目的地 (儲存空間) 節點,請在側邊選單的「Connectors」(連接器) 區段中選取「Vertex AI Vision's Media Warehouse」(Vertex AI Vision 的媒體倉儲) 選項。 
- 在「Vertex AI Vision's Media Warehouse」(Vertex AI Vision 的媒體倉儲) 選單中,按一下「Connect warehouse」(連結倉儲)。 
- 在「Connect Warehouse」(連結倉儲) 選單中,選取 「Create new warehouse」(新建倉儲)。將倉儲命名為 - quickstart-warehouse,並將 TTL 持續時間保留 14 天。
- 按一下「Create」(建立) 按鈕來新增倉儲。  
- 開啟 Vertex AI Vision 資訊主頁的「應用程式」分頁。 
- 在清單中,選取 - quickstart-app應用程式旁邊的「查看圖表」。
- 在應用程式圖表建構工具頁面中,按一下「部署」按鈕。 
- 在隨即顯示的確認對話方塊中,選取「Deploy」。 - 部署作業可能需要幾分鐘才能完成。部署作業完成後,節點旁會顯示綠色勾號。   
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
- In the Google Cloud console, go to the Warehouses page.
- 
    Locate
    
      your quickstart-warehousewarehouse.
- To delete the warehouse, click Actions, click Delete warehouse, and then follow the instructions.
- In the Google Cloud console, go to the Streams page.
- 
    Locate
    
      your quickstart-streamstream.
- To delete the stream, click Actions, click Delete stream, and then follow the instructions.
- In the Google Cloud console, go to the Applications page.
- 
    Locate
    
      your quickstart-appapp.
- To delete the app, click Actions, click Delete application, and then follow the instructions.
- 請先參閱「設定專案和開發環境」一文,再使用指令列工具。
- 瞭解如何擷取資料至新應用程式,並參閱「建構應用程式」,瞭解可新增的其他元件。
- 如要瞭解其他輸出儲存空間和處理選項,請參閱「將應用程式輸出結果連結至資料目的地」一文。
- 請參閱這篇文章,瞭解如何在控制台中查看搜尋倉儲資料。
- 進一步瞭解負責任的 AI 做法。
建立物件偵測應用程式
設定環境後,即可建立應用程式。
在 Google Cloud 控制台中,應用程式會以圖表形式呈現。此外,在 Vertex AI Vision 中,應用程式圖表必須至少有兩個節點:影片來源節點 (串流) 和至少一個節點 (處理模型或輸出目的地)。
建立空白的應用程式
您必須先建立空白應用程式,才能填入應用程式圖表。
控制台
在 Google Cloud 控制台中建立應用程式。
新增應用程式元件節點
建立空白應用程式後,您可以在應用程式圖表中新增三個節點:可接收串流資料的擷取節點、對資料執行電腦圖像工作的處理節點,以及資料目的地節點 (本例中為資料倉儲目的地)。
控制台
在管理中心將元件節點新增至應用程式。
新增資料匯入節點
新增資料處理節點
新增資料儲存節點
部署應用程式以供使用
使用所有必要元件建構端對端應用程式後,最後一個步驟就是部署應用程式。控制台
恭喜!您剛建立並部署了第一個 Vertex AI Vision 應用程式。建立及部署應用程式是使用 Vertex AI Vision 擷取及使用處理後媒體資料的第一步。
清除所用資源
如要避免系統向您的 Google Cloud 帳戶收取本快速入門所用資源的費用,請刪除含有相關資源的專案,或者保留專案但刪除個別資源。