apache / apache/beam

Change org.apache.beam.sdk.extensions.ml.CloudVision to associate the AnnotateImageResponses with the image data used for the annotation

Open
#20,418 0 comments 0 reactions 0 assignees View on GitHub
extensions gcp improvement java P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

There is a problem with the design of that transform. It takes a PCollection (in case of GCS URIs) in and outputs PCollection\>. There is no way to associate the responses with the original file URIs. [ImageAnnotationContext](https://cloud.google.com/vision/docs/reference/rest/v1/AnnotateImageResponse#ImageAnnotationContext) is returned as part of the response, but the "uri" is empty for the majority of annotations (looks like it's only populated for file annotations and not for image annotations).

One approach is to return KV\> for images where the key is the GCS URI and for bytes to pass an id of any type and do KV\>.

Imported from Jira [BEAM-10692](https://issues.apache.org/jira/browse/BEAM-10692). Original Jira may contain additional context.
Reported by: slilichenko.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.