Skip to content

Latest commit

History

536 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Google Cloud Vision Client for Java

Java idiomatic client for Cloud Vision.

MavenStability

Quickstart

If you are using Maven with BOM, add this to your pom.xml file

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>16.2.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-vision</artifactId>
</dependency>
</dependencies>

If you are using Maven without BOM, add this to your dependencies:

<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-vision</artifactId>
<version>1.100.10</version>
</dependency>

If you are using Gradle 5.x or later, add this to your dependencies

implementation platform('com.google.cloud:libraries-bom:16.3.0')
compile 'com.google.cloud:google-cloud-vision'

If you are using Gradle without BOM, add this to your dependencies

compile 'com.google.cloud:google-cloud-vision:1.100.10'

If you are using SBT, add this to your dependencies

libraryDependencies +="com.google.cloud"%"google-cloud-vision"%"1.100.10"

Authentication

See the Authentication section in the base directory's README.

Getting Started

Prerequisites

You will need a Google Cloud Platform Console project with the Cloud Vision API enabled. You will need to enable billing to use Google Cloud Vision. Follow these instructions to get your project set up. You will also need to set up the local development environment by installing the Google Cloud SDK and running the following commands in command line: gcloud auth login and gcloud config set project [YOUR PROJECT ID].

Installation and setup

You'll need to obtain the google-cloud-vision library. See the Quickstart section to add google-cloud-vision as a dependency in your code.

About Cloud Vision

Cloud Vision allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content.

See the Cloud Vision client library docs to learn how to use this Cloud Vision Client Library.

Samples

Samples are in the samples/ directory. The samples' README.md has instructions for running the samples.

SampleSource CodeTry it
Async Batch Image Annotationsource codeOpen in Cloud Shell
Nonesource codeOpen in Cloud Shell
Nonesource codeOpen in Cloud Shell
Async Batch Annotate Images Gcssource codeOpen in Cloud Shell
Detectsource codeOpen in Cloud Shell
Detect Batch Annotate Filessource codeOpen in Cloud Shell
Detect Batch Annotate Files Gcssource codeOpen in Cloud Shell
Detect Betasource codeOpen in Cloud Shell
Import Product Setssource codeOpen in Cloud Shell
Product In Product Set Managementsource codeOpen in Cloud Shell
Product Managementsource codeOpen in Cloud Shell
Product Searchsource codeOpen in Cloud Shell
Product Set Managementsource codeOpen in Cloud Shell
Reference Image Managementsource codeOpen in Cloud Shell
Quickstart Samplesource codeOpen in Cloud Shell
Async Batch Annotate Imagessource codeOpen in Cloud Shell
Batch Annotate Filessource codeOpen in Cloud Shell
Batch Annotate Files Gcssource codeOpen in Cloud Shell
Detect Crop Hintssource codeOpen in Cloud Shell
Detect Crop Hints Gcssource codeOpen in Cloud Shell
Detect Facessource codeOpen in Cloud Shell
Detect Faces Gcssource codeOpen in Cloud Shell
Detect Labelssource codeOpen in Cloud Shell
Detect Labels Gcssource codeOpen in Cloud Shell
Detect Landmarkssource codeOpen in Cloud Shell
Detect Landmarks Gcssource codeOpen in Cloud Shell
Detect Landmarks Urlsource codeOpen in Cloud Shell
Detect Logossource codeOpen in Cloud Shell
Detect Logos Gcssource codeOpen in Cloud Shell
Detect Propertiessource codeOpen in Cloud Shell
Detect Properties Gcssource codeOpen in Cloud Shell
Detect Safe Searchsource codeOpen in Cloud Shell
Detect Safe Search Gcssource codeOpen in Cloud Shell
Detect Textsource codeOpen in Cloud Shell
Detect Text Gcssource codeOpen in Cloud Shell
Detect Web Detectionssource codeOpen in Cloud Shell
Detect Web Detections Gcssource codeOpen in Cloud Shell
Detect Web Entitiessource codeOpen in Cloud Shell
Detect Web Entities Gcssource codeOpen in Cloud Shell
Detect Web Entities Include Geo Resultssource codeOpen in Cloud Shell
Detect Web Entities Include Geo Results Gcssource codeOpen in Cloud Shell
Purge Productssource codeOpen in Cloud Shell
Purge Products In Product Setsource codeOpen in Cloud Shell
Set Endpointsource codeOpen in Cloud Shell
Applicationsource codeOpen in Cloud Shell
Vision Controllersource codeOpen in Cloud Shell

Troubleshooting

To get help, follow the instructions in the shared Troubleshooting document.

Transport

Cloud Vision uses gRPC for the transport layer.

Java Versions

Java 7 or above is required for using this client.

Versioning

This library follows Semantic Versioning.

Contributing

Contributions to this library are always welcome and highly encouraged.

See CONTRIBUTING for more information how to get started.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See Code of Conduct for more information.

License

Apache 2.0 - See LICENSE for more information.

CI Status

Java VersionStatus
Java 7Kokoro CI
Java 8Kokoro CI
Java 8 OSXKokoro CI
Java 8 WindowsKokoro CI
Java 11Kokoro CI

Java is a registered trademark of Oracle and/or its affiliates.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages