Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Sie das Vertex AI SDK für Python verwenden möchten, muss das Dienstkonto, das den Client initialisiert, die IAM-Rolle Dienst-Agent von Vertex AI (roles/aiplatform.serviceAgent) haben.
Richten Sie Ihr Google Cloud Projekt für die Verwendung von Vertex AI ein. Erstellen Sie dann einen Cloud Storage-Bucket und kopieren Sie die Bilddateien, die zum Trainieren eines AutoML-Bildklassifizierungsmodells verwendet werden sollen.
Öffnen Sie Cloud Shell.
Cloud Shell ist eine interaktive Shell-Umgebung für Google Cloud , mit der Sie Projekte und Ressourcen über Ihren Webbrowser verwalten können.
Legen Sie in Cloud Shell das aktuelle Projekt auf Ihre Projekt-ID Google Cloudfest und speichern Sie es in der Shell-Variablen projectid:
gcloud config set project PROJECT_ID &&
projectid=PROJECT_ID &&
echo $projectid
Ersetzen Sie PROJECT_ID durch Ihre Projekt-ID. Sie finden Ihre Projekt-ID in der Google Cloud -Console. Weitere Informationen finden Sie unter Projekt-ID ermitteln.
Enable the IAM, Compute Engine, Notebooks, Cloud Storage, and Vertex AI APIs.
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.
For all rows that specify or include you, check the Role column to see whether
the list of roles includes the required roles.
Geben Sie im Feld Neue Hauptkonten Ihre Nutzer-ID ein.
Dies ist in der Regel die E-Mail-Adresse eines Google-Kontos.
Wählen Sie in der Liste Rolle auswählen eine Rolle aus.
Wenn Sie weitere Rollen hinzufügen möchten, klicken Sie auf addWeitere Rolle hinzufügen und fügen Sie weitere Rollen hinzu.
Klicken Sie auf Speichern.
Die IAM-Rolle „Vertex AI-Nutzer“ (roles/aiplatform.user) bietet Zugriff auf alle Ressourcen in Vertex AI. Mit der Rolle Storage-Administrator (roles/storage.admin) speichern Sie das Trainings-Dataset des Dokuments in Cloud Storage.
Nächste Schritte
Folgen Sie der nächsten Seite dieser Anleitung, um mit derGoogle Cloud -Konsole ein Dataset zur Bildklassifizierung zu erstellen und in einem öffentlichen Cloud Storage-Bucket gehostete Bilder zu importieren.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-18 (UTC)."],[],[],null,["# Hello image data: Set up your project and environment\n\nIf you plan to use the Vertex AI SDK for Python, make sure that the service account\ninitializing the client has the\n[Vertex AI Service Agent](/vertex-ai/docs/general/access-control#aiplatform.serviceAgent)\n(`roles/aiplatform.serviceAgent`) IAM role.\n\nYou'll set up your Google Cloud project to use Vertex AI. Then create a\nCloud Storage bucket and copy image files to use for training an AutoML\nimage classification model.\n\nThis tutorial has several pages:\n\n1. Set up your project and environment.\n\n2. [Create an image classification dataset, and\n import images.](/vertex-ai/docs/tutorials/image-classification-automl/dataset)\n\n3. [Train an AutoML image classification\n model.](/vertex-ai/docs/tutorials/image-classification-automl/training)\n\n4. [Evaluate and analyze model performance.](/vertex-ai/docs/tutorials/image-classification-automl/error-analysis)\n\n5. [Deploy a model to an endpoint, and send a\n prediction.](/vertex-ai/docs/tutorials/image-classification-automl/deploy-predict)\n\n6. [Clean up your project.](/vertex-ai/docs/tutorials/image-classification-automl/cleanup)\n\nEach page assumes that you have already performed the instructions from the\nprevious pages of the tutorial.\n\nBefore you begin\n----------------\n\nComplete the following steps before using Vertex AI functionality.\n\n1. In the Google Cloud console, go to the project selector page.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n2. Select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n3.\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n4. Open [Cloud Shell](/shell/docs/launching-cloud-shell-editor). Cloud Shell is an interactive shell environment for Google Cloud that lets you manage your projects and resources from your web browser.\n[Go to Cloud Shell](https://ssh.cloud.google.com/cloudshell/editor)\n5. In the Cloud Shell, set the current project to your Google Cloud project ID and store it in the `projectid` shell variable: \n\n ```\n gcloud config set project PROJECT_ID &&\n projectid=PROJECT_ID &&\n echo $projectid\n ```\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with your project ID. You can locate your project ID in the Google Cloud console. For more information, see [Find your project ID](/vertex-ai/docs/tutorials/tabular-bq-prediction/prerequisites#find-project-id).\n6.\n\n\n Enable the IAM, Compute Engine, Notebooks, Cloud Storage, and Vertex AI APIs.\n\n\n [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=iam.googleapis.com, compute.googleapis.com,notebooks.googleapis.com storage.googleapis.com aiplatform.googleapis.com)\n7.\n\n Make sure that you have the following role or roles on the project:\n\n roles/aiplatform.user, roles/storage.admin\n\n #### Check for the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3.\n In the **Principal** column, find all rows that identify you or a group that\n you're included in. To learn which groups you're included in, contact your\n administrator.\n\n 4. For all rows that specify or include you, check the **Role** column to see whether the list of roles includes the required roles.\n\n #### Grant the roles\n\n 1.\n In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=project)\n 2. Select the project.\n 3. Click person_add **Grant access**.\n 4.\n In the **New principals** field, enter your user identifier.\n\n This is typically the email address for a Google Account.\n\n 5. In the **Select a role** list, select a role.\n 6. To grant additional roles, click add **Add\n another role** and add each additional role.\n 7. Click **Save**.\nThe Vertex AI User (`roles/aiplatform.user`) IAM role provides access to use all resources in Vertex AI. The [Storage Admin](/storage/docs/access-control/iam-roles) (`roles/storage.admin`) role you store the document's training dataset in Cloud Storage.\n\nWhat's next\n-----------\n\nFollow the [next page of this tutorial](/vertex-ai/docs/tutorials/image-classification-automl/dataset) to use the\nGoogle Cloud console to create an image classification dataset and\nimport images hosted in a public Cloud Storage bucket."]]