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)

オープン
#2,605 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
api: vertex-ai
主要言語
Python
スター
905
フォーク
465
平均マージ
1日 13時間
マージ済み PR(30日)
44

説明

#### Environment details

- OS type and version:
- Python version: 3.11
- pip version: 3.11
- `google-cloud-aiplatform` version: 1.33.0

#### Steps to reproduce

1. Retrieve image data set object using aiplatform.ImageDataset(f"projects/{project_id}/locations/us-central1/datasets/{dataset_id}")
2. 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')
3. 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

```python
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 をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。