googleapis / googleapis/python-aiplatform
New annotation set is created for dataset when images are added through api (but not through manual upload of same JSON)
未关闭
还没有人认领这个 Issue。
api: vertex-ai
- 主要语言
- Python
- 星标
- 907
- 派生
- 466
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 44
描述
Environment details
- OS type and version:
- Python version: 3.11
- pip version: 3.11
google-cloud-aiplatformversion: 1.33.0
Steps to reproduce
- Retrieve image data set object using aiplatform.ImageDataset(f"projects/{project_id}/locations/us-central1/datasets/{dataset_id}")
- Import some images with bounding boxes using dataset.import_data( gcs_source=[f"gs://{bucket_name}/{jsonl_file_name}"], import_schema_uri='gs://google-cloud-aiplatform/schema/dataset/ioformat/image_bounding_box_io_format_1.0.0.yaml')
- Look at dataset in google cloud console, on first inspection images seem unlabelled, but looking more closely all the of the previously images have annotations in an annotation set called 'my_dataset_iod' whereas those imported with the import_data call have a new annotation set called something like 'my_dataset_image_bounding_box_2023_09_19_080419'. The labels appear in the cloud console when the relevant annotation set is selected, therefore the labels appear either on the newly imported images, or the ones that were there before (and had been manually uploaded through the console), but there is no way to have full set labelled simultaneously.
I've looked but so far failed to to find any reference to annotation sets anywhere in the api documentation
Code example
from google.cloud import storage
from google.cloud import aiplatform
.....
current_datetime = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
jsonl_file_name = f"data_{current_datetime}.jsonl"
jsonl_blob = bucket.blob(jsonl_file_name)
jsonl_blob.upload_from_string(jsonl_string, content_type='application/jsonl')
dataset = aiplatform.ImageDataset(f"projects/{project_id}/locations/us-central1/datasets/{dataset_id}")
dataset.import_data( gcs_source=[f"gs://{bucket_name}/{jsonl_file_name}"], import_schema_uri='gs://google-cloud-aiplatform/schema/dataset/ioformat/image_bounding_box_io_format_1.0.0.yaml')
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
Start with the ImageDataset.import_data call and the image_bounding_box_io_format_1.0.0.yaml schema named in the report, then compare its behavior with the manual JSON upload path. Done means imported images and existing images use the expected annotation set together, with coverage for the reported reproduction.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- google-cloud, python
- 领域
- api, data, machine-learning
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100