python - 自动上传训练数据标签 csv 和训练处理 AutoML Vision 图像分类中的模型

标签 python google-cloud-platform automl google-cloud-automl

我必须手动上传训练数据标签 CSV,然后单击“训练”来训练模型。我想最好用 python 来自动化所有这些。

最佳答案

您可以使用google-cloud-automl使用 Python 自动化此操作。例如:

from google.cloud import automl_v1beta1

client = automl_v1beta1.AutoMlClient()

parent = client.location_path('[PROJECT]', '[LOCATION]')

# Create the dataset
dataset = {} . # TODO: Initialize `dataset`
response = client.create_dataset(parent, dataset)

# Create the model
model = {}  # TODO: Initialize `model`
response = client.create_model(parent, model)

def callback(operation_future):
    result = operation_future.result()  # Handle result

response.add_done_callback(callback)
metadata = response.metadata()

关于python - 自动上传训练数据标签 csv 和训练处理 AutoML Vision 图像分类中的模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57115839/

相关文章:

go - 编码文件以发送到 Google AutoML

google-apis-explorer - 将图像导入 Cloud AutoML Vision 中的 Google 存储时出错

python - 计算字符串中某个字符出现次数的首选方法是什么?

python - Numpy 追加 : Automatically cast an array of the wrong dimension

python - 如何在python中设置全局const变量

python-3.x - 为什么在部署到 AppEngine 时未安装 requirements.txt?

python - 为seaborn lmplot添加文本注释

authentication - 如何安全地将我的 Google Cloud 应用凭据提供给其他人?

python - 用户无权查询 bigquery 表

google-cloud-automl - 如何导出 Google AutoML 文本分类模型?