在控制台中构建应用
了解如何在Google Cloud 控制台中创建简单的 Vertex AI Vision 对象检测器应用。
如需在 Google Cloud 控制台中直接遵循有关此任务的分步指导,请点击操作演示:
准备工作
- 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行中,选择 查看图表。这样会进入处理流水线的图表可视化界面。
- 如需添加输入视频流节点,请选择侧边菜单的连接器部分中的视频流选项。 
- 在打开的视频流菜单的来源部分中,选择 添加视频流。 
- 在添加视频流菜单中,选择 注册新的视频流,然后添加 - quickstart-stream作为视频流名称。
- 如需将视频流添加到应用图表中,请点击添加视频流。 
- 如需添加对象检测器模型节点,请选择侧边菜单的预训练模型部分中的对象检测器选项。  
- 如需添加输出目标位置(存储)节点,请选择侧边菜单的连接器部分中的 Vertex AI Vision 的媒体仓库选项。 
- 在 Vertex AI Vision 的媒体仓库菜单中,点击连接仓库。 
- 在连接仓库菜单中,选择 创建新仓库。将仓库命名为 - quickstart-warehouse,并将 TTL 时长保留 14 天。
- 点击创建按钮以添加仓库。  
- 打开 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.
- 在使用命令行工具之前,请先阅读设置项目和开发环境。
- 了解如何注入数据到新应用中,并了解可在构建应用中添加的其他组件。
- 如需了解其他输出存储和处理选项,请参阅将应用输出连接到数据目标位置。
- 了解如何在控制台中搜索 Search Warehouse 数据。
- 详细了解 Responsible AI 实践。
创建对象检测器应用
设置好环境后,您就可以创建应用了。
在 Google Cloud 控制台中,应用以图表形式表示。此外,在 Vertex AI Vision 中,应用图必须至少包含两个节点:一个视频源节点(流),以及至少一个其他节点(处理模型或输出目的地)。
创建空应用
在填充应用图之前,您必须先创建一个空应用。
控制台
在 Google Cloud 控制台中创建应用。
添加应用组件节点
创建空应用后,您可以向应用图添加三个节点:可接收流数据的注入节点、可对数据执行计算机视觉任务的处理节点,以及数据目标节点(在本例中为数据仓库存储目标)。
控制台
在控制台中向应用添加组件节点。
添加数据注入节点
添加数据处理节点
添加数据存储节点
部署应用以供使用
在构建包含所有必需组件的端到端应用后,使用该应用的最后一步是部署它。控制台
恭喜!您刚刚创建并部署了第一个 Vertex AI Vision 应用。创建和部署应用是使用 Vertex AI Vision 提取和使用处理后的媒体数据的第一步。
清理
为避免因本快速入门中使用的资源导致您的 Google Cloud 账号产生费用,请删除包含这些资源的项目,或者保留项目但删除各个资源。