Before you can use AI Platform Data Labeling Service, you must enable it for your project.
- 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.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Data Labeling API.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Data Labeling API.
- Install the Google Cloud CLI and the Google Cloud CLI.
- Follow the instructions to create a service account and download a key file for that account.
- Set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path to the service account key file that you downloaded when you created the service account.export GOOGLE_APPLICATION_CREDENTIALS=KEY_FILE
- Set the
PROJECT_ID
environment variable to your Project ID.export PROJECT_ID=YOUR_PROJECT_ID
The Data Labeling API calls and resource names include your Project ID in them. ThePROJECT_ID
environment variable provides a convenient way to specify the ID. - Add your user account and your service account to the Data Labeling Editor IAM role.
- Replace YOUR_USERID@YOUR_DOMAIN with your user account.
- Replace SERVICE_ACCOUNT_NAME with the name of
your new service account, for example
service-account1@myproject.iam.gserviceaccount.com
.
gcloud auth login gcloud projects add-iam-policy-binding $PROJECT_ID
--member="user:YOUR_USERID@YOUR_DOMAIN"
--role="roles/datalabeling.editor" gcloud projects add-iam-policy-binding $PROJECT_ID
--member="serviceAccount:SERVICE_ACCOUNT_EMAIL"
--role="roles/datalabeling.editor" - Create a Google Cloud Storage bucket to store the data that you want to label and the instructions for the labelers.