@Experimental public class CloudVision extends java.lang.Object
AnnotateImages
.
Example usage:
pipeline .apply(Create.of(IMAGE_URI)) .apply(CloudVision.annotateImagesFromGcsUri(sideInputWithContext, features, 1, 1));
Modifier and Type | Class and Description |
---|---|
static class |
CloudVision.AnnotateImagesFromBytes
Accepts
ByteString (encoded image contents) with optional DoFn.SideInput with a Map of ImageContext to
the image. |
static class |
CloudVision.AnnotateImagesFromBytesWithContext
|
static class |
CloudVision.AnnotateImagesFromGcsUri
Accepts
String (image URI on GCS) with optional DoFn.SideInput with a Map of ImageContext to
the image. |
static class |
CloudVision.AnnotateImagesFromGcsUriWithContext
|
Constructor and Description |
---|
CloudVision() |
Modifier and Type | Method and Description |
---|---|
static CloudVision.AnnotateImagesFromBytes |
annotateImagesFromBytes(PCollectionView<java.util.Map<ByteString,com.google.cloud.vision.v1.ImageContext>> contextSideInput,
java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize)
Creates a
PTransform that annotates images from their
contents encoded in ByteString s. |
static CloudVision.AnnotateImagesFromBytes |
annotateImagesFromBytes(PCollectionView<java.util.Map<ByteString,com.google.cloud.vision.v1.ImageContext>> contextSideInput,
java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize,
int desiredRequestParallelism)
Creates a
PTransform that annotates images from their
contents encoded in ByteString s. |
static CloudVision.AnnotateImagesFromBytesWithContext |
annotateImagesFromBytesWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize)
Creates a
PTransform that annotates images from KVs of
their GCS addresses in Strings and ImageContext for each image. |
static CloudVision.AnnotateImagesFromBytesWithContext |
annotateImagesFromBytesWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize,
int desiredRequestParallelism)
Creates a
PTransform that annotates images from KVs of
their GCS addresses in Strings and ImageContext for each image. |
static CloudVision.AnnotateImagesFromGcsUri |
annotateImagesFromGcsUri(PCollectionView<java.util.Map<java.lang.String,com.google.cloud.vision.v1.ImageContext>> contextSideInput,
java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize)
Creates a
PTransform that annotates images from their
GCS addresses. |
static CloudVision.AnnotateImagesFromGcsUri |
annotateImagesFromGcsUri(PCollectionView<java.util.Map<java.lang.String,com.google.cloud.vision.v1.ImageContext>> contextSideInput,
java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize,
int desiredRequestParallelism)
Creates a
PTransform that annotates images from their
GCS addresses. |
static CloudVision.AnnotateImagesFromGcsUriWithContext |
annotateImagesFromGcsUriWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize)
Creates a
PTransform that annotates images from KVs of
their String-encoded contents and ImageContext for each image. |
static CloudVision.AnnotateImagesFromGcsUriWithContext |
annotateImagesFromGcsUriWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features,
long batchSize,
int desiredRequestParallelism)
Creates a
PTransform that annotates images from KVs of
their String-encoded contents and ImageContext for each image. |
public static CloudVision.AnnotateImagesFromGcsUri annotateImagesFromGcsUri(PCollectionView<java.util.Map<java.lang.String,com.google.cloud.vision.v1.ImageContext>> contextSideInput, java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize, int desiredRequestParallelism)
PTransform
that annotates images from their
GCS addresses.contextSideInput
- optional side input with contexts for select images. The ImageContext
objects provide additional metadata for the annotation API. This way users
canfeatures
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.desiredRequestParallelism
- desired number of concurrent batched requests.public static CloudVision.AnnotateImagesFromGcsUri annotateImagesFromGcsUri(PCollectionView<java.util.Map<java.lang.String,com.google.cloud.vision.v1.ImageContext>> contextSideInput, java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize)
PTransform
that annotates images from their
GCS addresses. Uses a default value 5 for desiredRequestParallelism.contextSideInput
- optional side input with contexts for select images. The ImageContext
objects provide additional metadata for the annotation API. This way users
can fine-tune analysis of selected images.features
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.public static CloudVision.AnnotateImagesFromBytes annotateImagesFromBytes(PCollectionView<java.util.Map<ByteString,com.google.cloud.vision.v1.ImageContext>> contextSideInput, java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize, int desiredRequestParallelism)
PTransform
that annotates images from their
contents encoded in ByteString
s.contextSideInput
- optional side input with contexts for select images. The ImageContext
objects provide additional metadata for the annotation API. This way users
can fine-tune analysis of selected images.features
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.desiredRequestParallelism
- desired number of concurrent batched requests.public static CloudVision.AnnotateImagesFromBytes annotateImagesFromBytes(PCollectionView<java.util.Map<ByteString,com.google.cloud.vision.v1.ImageContext>> contextSideInput, java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize)
PTransform
that annotates images from their
contents encoded in ByteString
s. Uses a default value 5 for desiredRequestParallelism.contextSideInput
- optional side input with contexts for select images. The ImageContext
objects provide additional metadata for the annotation API. This way users
can fine-tune analysis of selected images.features
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.public static CloudVision.AnnotateImagesFromBytesWithContext annotateImagesFromBytesWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize, int desiredRequestParallelism)
PTransform
that annotates images from KVs of
their GCS addresses in Strings and ImageContext
for each image.features
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.desiredRequestParallelism
- desired number of concurrent batched requests.public static CloudVision.AnnotateImagesFromBytesWithContext annotateImagesFromBytesWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize)
PTransform
that annotates images from KVs of
their GCS addresses in Strings and ImageContext
for each image. Uses a default value 5
for desiredRequestParallelism.features
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.public static CloudVision.AnnotateImagesFromGcsUriWithContext annotateImagesFromGcsUriWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize, int desiredRequestParallelism)
PTransform
that annotates images from KVs of
their String-encoded contents and ImageContext
for each image.features
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.desiredRequestParallelism
- desired number of concurrent batched requests.public static CloudVision.AnnotateImagesFromGcsUriWithContext annotateImagesFromGcsUriWithContext(java.util.List<com.google.cloud.vision.v1.Feature> features, long batchSize)
PTransform
that annotates images from KVs of
their String-encoded contents and ImageContext
for each image. Uses a default value 5
for desiredRequestParallelism.features
- annotation features that should be passed to the APIbatchSize
- request batch size to be sent to API. Max 16, at least 1.