Coder Social home page Coder Social logo

googlecodelabs / cloud-vision-python Goto Github PK

View Code? Open in Web Editor NEW
16.0 10.0 6.0 23 KB

Code repo for the Google Cloud Vision API for Python codelab scripts

Home Page: http://g.co/codelabs/vision-python

License: Apache License 2.0

Python 100.00%
google-cloud google-api google-apis google-api-client google-api-client-library google-cloud-platform gcp google-cloud-vision cloud-vision-api cloud-vision

cloud-vision-python's Introduction

Using the Vision API with Python

Learn how to use various functionality of the Google Cloud Vision API with Python by building 4 separate scripts that highlight a different feature available in the API. This is the corresponding code repo for the Using the Vision API with Python codelab (free, self-paced, hands-on tutorial) at http://g.co/codelabs/vision-python.

Prerequisites

  • A Gmail/Google account (Workspace accounts may require administrator approval)
  • A Google Cloud (Platform) project
  • An active GCP billing account
  • Basic Python skills

Supported versions: Python 2.6+ or 3.6+

Python 2 considerations

Python 2 has been sunset by its community in Jan 2020. As such, support for Python 2 in most Google Cloud products will be waning over time (with the except of App Engine, which has expressed continued long-term support of legacy runtimes). This includes the Vision API, whose final client library version supporting Python 2 is v1.0.0, and whose use is no longer featured in the Vision API documentation.

To help accelerate upgrading to 3.x, the scripts in this tutorial only support Python 3 as-is, but commented out code supporting both Python 2 & 3 are available for use if desired. Removing the "# Py2+3" in the code samples gives you a script that works under both Python 2 (under Vision client library v1.0.0) and Python 3 (latest Vision client library). (No "Python 2-only" options are provided.) The Vision API client library source can be found in its open source repo.

Description

The Google Cloud Vision API allows developers to easily integrate vision detection features within applications, including image labeling, facial features detection, landmark detection, optical character recognition (OCR), "safe search", or tagging of explicit content, detecting product or corporate logos, and several others. These are sample scripts that demonstrate usage of the API for the Python language. The code in this repo is both Python 2 & 3 compatible. It is available in Python 2 to help developers migrate to Python 3, and we recommend migrating to 3.x as soon as possible.

Codelab

This repository consists of the sample scripts that correspond to the "Using the Vision API with Python" hands-on codelab. That codelab teaches developers how to use some of the features described above with the Cloud Vision API using Python, namely label annotations, OCR/text extraction, landmark detection, and detecting facial features.

Cost

Use of the Vision API is not free, however certain Google Cloud Platform (GCP) products feature an "Always Free" tier for which you have to exceed in order to incur billing. For the purposes of the codelab, each call to the Vision API counts against that free tier, and so long as you stay within its limits in aggregate (within each month), you should not incur any charges.

Resources

Cloud Vision API

Python and Google Cloud

Other languages

Support

If you've found an error in the codelab or the sample app, check the Issues tab to see if there's an open issue or file a new one. Patches are encouraged; please refer to CONTRIBUTING for details.

cloud-vision-python's People

Contributors

wescpy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.