Skip to content

Commit df6eba9

Browse files
Add PartID when exporting dataset (#5205)
1 parent 84e59c6 commit df6eba9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cli/dataset.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ type ImageMetadata struct {
240240
ImagePath string `json:"image_path"`
241241
ClassificationAnnotations []Annotation `json:"classification_annotations"`
242242
BBoxAnnotations []BBoxAnnotation `json:"bounding_box_annotations"`
243+
Timestamp string `json:"timestamp"`
244+
PartID string `json:"part_id"`
245+
ComponentName string `json:"component_name"`
243246
}
244247

245248
// BBoxAnnotation holds the information associated with each bounding box.
@@ -297,6 +300,9 @@ func binaryDataToJSONLines(ctx context.Context, client datapb.DataServiceClient,
297300
ImagePath: fileName,
298301
ClassificationAnnotations: annotations,
299302
BBoxAnnotations: bboxAnnotations,
303+
PartID: datum.GetMetadata().GetCaptureMetadata().GetPartId(),
304+
ComponentName: datum.GetMetadata().GetCaptureMetadata().GetComponentName(),
305+
Timestamp: datum.GetMetadata().GetTimeRequested().AsTime().String(),
300306
}
301307

302308
line, err := json.Marshal(jsonl)

0 commit comments

Comments
 (0)