导入vertexai图像对象检测后未标记的图像未标记
我正在使用此示例将我的图像和注释数据(JSONL文件)导入到我的Vertexai数据集中: https://cloud.google.com/vertex-ai/docs/samples/aiplatform-import-import-import-import-image-image-image-object-detection-sample-sample
from google.cloud import aiplatform
import os
#https://cloud.google.com/vertex-ai/docs/samples/aiplatform-import-data-image-object-detection-sample
def import_data_image_object_detection_sample(
project: str = proj,
dataset_id: str = datasetID,
gcs_source_uri: str = cloudURIToInputFile,
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
timeout: int = 1800,
):
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
# This client only needs to be created once, and can be reused for multiple requests.
client = aiplatform.gapic.DatasetServiceClient(client_options=client_options)
import_configs = [
{
"gcs_source": {"uris": [gcs_source_uri]},
"import_schema_uri": "gs://google-cloud-aiplatform/schema/dataset/ioformat/image_bounding_box_io_format_1.0.0.yaml",
}
]
name = client.dataset_path(project=project, location=location, dataset=dataset_id)
response = client.import_data(name=name, import_configs=import_configs)
print("Long running operation:", response.operation.name)
import_data_response = response.result(timeout=timeout)
print("import_data_response:", import_data_response)
import_data_image_object_detection_sample()
运行此操作后,所有图像都成功上传了,但是图像上没有标签显示。前几天,我能够成功地用标签导入它们,因此我不确定现在正在发生什么。谢谢
I'm using this example to import my images and annotation data (JSONL file) into my vertexAI dataset:
https://cloud.google.com/vertex-ai/docs/samples/aiplatform-import-data-image-object-detection-sample
from google.cloud import aiplatform
import os
#https://cloud.google.com/vertex-ai/docs/samples/aiplatform-import-data-image-object-detection-sample
def import_data_image_object_detection_sample(
project: str = proj,
dataset_id: str = datasetID,
gcs_source_uri: str = cloudURIToInputFile,
location: str = "us-central1",
api_endpoint: str = "us-central1-aiplatform.googleapis.com",
timeout: int = 1800,
):
# The AI Platform services require regional API endpoints.
client_options = {"api_endpoint": api_endpoint}
# Initialize client that will be used to create and send requests.
# This client only needs to be created once, and can be reused for multiple requests.
client = aiplatform.gapic.DatasetServiceClient(client_options=client_options)
import_configs = [
{
"gcs_source": {"uris": [gcs_source_uri]},
"import_schema_uri": "gs://google-cloud-aiplatform/schema/dataset/ioformat/image_bounding_box_io_format_1.0.0.yaml",
}
]
name = client.dataset_path(project=project, location=location, dataset=dataset_id)
response = client.import_data(name=name, import_configs=import_configs)
print("Long running operation:", response.operation.name)
import_data_response = response.result(timeout=timeout)
print("import_data_response:", import_data_response)
import_data_image_object_detection_sample()
After I run this, all of the images are uploaded successfully, but none of the labels show up on the images. I was able to import them all successfully with the labels the other day, so I am not sure what is happening now. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论