Hello 이미지 데이터: 프로젝트 및 환경 설정

Vertex AI SDK for Python을 사용하려는 경우 클라이언트를 초기화하는 서비스 계정에 Vertex AI 서비스 에이전트(roles/aiplatform.serviceAgent) IAM 역할이 있는지 확인합니다.

Vertex AI를 사용하도록 Google Cloud 프로젝트를 설정합니다. 그런 다음 Cloud Storage 버킷을 만들고 AutoML 이미지 분류 모델을 학습시키는 데 사용할 이미지 파일을 복사합니다.

이 튜토리얼은 여러 페이지로 이루어져 있습니다.

  1. 프로젝트 및 환경 설정

  2. 이미지 분류 데이터 세트 만들기 및 이미지 가져오기

  3. AutoML 이미지 분류 모델 학습

  4. 모델 성능 평가 및 분석

  5. 엔드포인트에 모델을 배포하고 예측 전송

  6. 프로젝트 삭제

각 페이지에서는 이 튜토리얼의 이전 페이지에서 안내를 이미 수행했다고 가정합니다.

시작하기 전에

Vertex AI 기능을 사용하려면 다음 단계를 완료합니다.

  1. In the Google Cloud console, go to the project selector page.

    Go to project selector

  2. 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 the resourcemanager.projects.create permission. Learn how to grant roles.
  3. Verify that billing is enabled for your Google Cloud project.

  4. Cloud Shell을 엽니다. Cloud Shell은 웹브라우저에서 프로젝트와 리소스를 관리할 수 있는 Google Cloud 용 대화형 셸 환경입니다.
  5. Cloud Shell로 이동
  6. Cloud Shell에서 현재 프로젝트를 Google Cloud프로젝트 ID로 설정하고 projectid 셸 변수에 저장합니다.
      gcloud config set project PROJECT_ID &&
      projectid=PROJECT_ID &&
      echo $projectid
    PROJECT_ID를 프로젝트 ID로 바꿉니다. 프로젝트 ID는 Google Cloud 콘솔에서 찾을 수 있습니다. 자세한 내용은 프로젝트 ID 찾기를 참조하세요.
  7. Enable the IAM, Compute Engine, Notebooks, Cloud Storage, and Vertex AI APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  8. Make sure that you have the following role or roles on the project: roles/aiplatform.user, roles/storage.admin

    Check for the roles

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

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

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

      IAM으로 이동
    2. 프로젝트를 선택합니다.
    3. 액세스 권한 부여를 클릭합니다.
    4. 새 주 구성원 필드에 사용자 식별자를 입력합니다. 일반적으로 Google 계정의 이메일 주소입니다.

    5. 역할 선택 목록에서 역할을 선택합니다.
    6. 역할을 추가로 부여하려면 다른 역할 추가를 클릭하고 각 역할을 추가합니다.
    7. 저장을 클릭합니다.
    Vertex AI 사용자(roles/aiplatform.user) IAM 역할은 Vertex AI의 모든 리소스를 사용할 수 있는 액세스 권한을 제공합니다. Cloud Storage에서 문서의 학습 데이터 세트에 저장하는 Storage Admin(roles/storage.admin) 역할입니다.

    다음 단계

    이 튜토리얼의 다음 페이지에 따라Google Cloud 콘솔을 사용하여 이미지 분류 데이터 세트를 만들고 공개 Cloud Storage 버킷에서 호스팅되는 이미지 가져오기