BigQuery 예측으로 점유율 분석 앱 만들기

Gemini Enterprise Agent Platform Vision은 동영상 데이터를 수집, 분석, 저장하는 데 사용할 수 있는 AI 기반 플랫폼입니다. Gemini Enterprise Agent Platform Vision을 사용하면 AI 애플리케이션을 빌드하고 배포할 수 있습니다. Gemini Enterprise Agent Platform Vision을 다른 제품 구성요소와 통합하여 엔드 투 엔드 Gemini Enterprise Agent Platform Vision 솔루션을 빌드할 수 있습니다.

Gemini Enterprise Agent Platform Vision 플랫폼을 사용하여 솔루션을 구현하려면 다음 Agent Platform Vision 개념과 구성요소를 검토하세요.

  • 스트림: 솔루션의 동영상 스트리밍 레이어를 나타냅니다. 스트림 소스는 라이브 동영상 (예: IP 카메라) 또는 동영상 파일(예: MP4 파일)일 수 있습니다.

  • 애플리케이션: 스트림과 AI 프로세서 간의 연결을 사용 설정하여 동영상에 머신러닝 작업을 실행합니다. 예를 들어 카메라 스트림을 카메라 앞을 지나가는 사람 수를 세는 AI 모델에 연결할 수 있습니다.

  • 앱 출력 대상: 분석된 데이터를 스토리지 대상(Gemini Enterprise Agent Platform Vision의 미디어 창고 또는 BigQuery)으로 전송하거나 실시간 데이터를 수신합니다. Gemini Enterprise Agent Platform Vision의 미디어 웨어하우스에 저장하면 수집된 스트림의 데이터에 사용된 AI 프로세서의 분석 출력과 메타데이터를 검색할 수 있습니다. BigQuery에 저장하면 제품의 오프라인 분석 기능을 사용할 수 있습니다. 앱 출력을 직접 수신하는 경우 통계를 사용하여 즉시 비즈니스 결정을 내릴 수 있습니다. 자세한 내용은 개요: 데이터 대상에 앱 출력 연결을 참고하세요.

목표

이 튜토리얼에서는 다음 작업을 처리하는 방법을 보여줍니다.

  • BigQuery 데이터 세트와 테이블을 만듭니다.
  • BigQuery에 연결되는 Gemini Enterprise Agent Platform Vision 점유율 분석 앱을 빌드합니다.
  • Compute Engine VM 인스턴스를 만들고 환경을 설정합니다.
  • VM 인스턴스에서 앱으로 동영상을 스트리밍합니다.
  • 저장된 앱 출력을 사용하여 BigQuery ML로 예측 모델을 만듭니다.

비용

이 문서에서는 비용이 청구될 수 있는 Google Cloud구성요소를 사용합니다.

프로젝트 사용량을 기준으로 예상 비용을 산출하려면 가격 계산기를 사용하세요.

Google Cloud 신규 사용자는 무료 체험판을 사용할 수 있습니다.

이 문서에 설명된 태스크를 완료했으면 만든 리소스를 삭제하여 청구가 계속되는 것을 방지할 수 있습니다. 자세한 내용은 삭제를 참조하세요.

시작하기 전에

  1. Google Cloud 계정에 로그인합니다. Google Cloud를 처음 사용하는 경우 계정을 만들고 Google 제품의 실제 성능을 평가해 보세요. 신규 고객에게는 워크로드를 실행, 테스트, 배포하는 데 사용할 수 있는 $300의 무료 크레딧이 제공됩니다.
  2. 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

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

  4. Enable the BigQuery, Compute Engine and Vision AI APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the APIs

  5. Create a service account:

    1. Ensure that you have the Create Service Accounts IAM role (roles/iam.serviceAccountCreator) and the Project IAM Admin role (roles/resourcemanager.projectIamAdmin). Learn how to grant roles.
    2. In the Google Cloud console, go to the Create service account page.

      Go to Create service account
    3. Select your project.
    4. In the Service account name field, enter a name. The Google Cloud console fills in the Service account ID field based on this name.

      In the Service account description field, enter a description. For example, Service account for quickstart.

    5. Click Create and continue.
    6. Grant the following roles to the service account: Vision AI > Vision AI Editor, Compute Engine > Compute Instance Admin (beta), BigQuery > BigQuery Data Owner, Storage > Storage Object Viewer.

      To grant a role, find the Select a role list, then select the role.

      To grant additional roles, click Add another role and add each additional role.

    7. Click Continue.
    8. Click Done to finish creating the service account.

      Do not close your browser window. You will use it in the next step.

  6. Create a service account key:

    1. In the Google Cloud console, click the email address for the service account that you created.
    2. Click Keys.
    3. Click Add key, and then click Create new key.
    4. Click Create. A JSON key file is downloaded to your computer.
    5. Click Close.
  7. Google Cloud CLI를 설치합니다.

  8. 외부 ID 공급업체(IdP)를 사용하는 경우 먼저 제휴 ID로 gcloud CLI에 로그인해야 합니다.

  9. gcloud CLI를 초기화하려면, 다음 명령어를 실행합니다.

    gcloud init
  10. 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 role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

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

  12. Enable the BigQuery, Compute Engine and Vision AI APIs.

    Roles required to enable APIs

    To enable APIs, you need the serviceusage.services.enable permission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.

    Enable the APIs

  13. Create a service account:

    1. Ensure that you have the Create Service Accounts IAM role (