This directory contains samples for Google Cloud Vision API. Google Cloud Vision API 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 migration guide for information about migrating to Python client library v0.25.1.
This sample requires you to have authentication setup. Refer to the Authentication Getting Started Guide for instructions on setting up credentials for applications.
- Install pip and virtualenv if you do not already have them. You may want to refer to the Python Development Environment Setup Guide for Google Cloud Platform for instructions.
Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.
$ virtualenv env $ source env/bin/activateInstall the dependencies needed to run the samples.
$ pip install -r requirements.txt
To run this sample:
$ python doctext.py
usage: doctext.py [-h] [-out_file OUT_FILE] detect_file
positional arguments:
detect_file The image for text detection.
optional arguments:
-h, --help show this help message and exit
-out_file OUT_FILE Optional output fileThis sample uses the Google Cloud Client Library for Python. You can read the documentation for more details on API usage and use GitHub to browse the source and report issues.