Skip to content

MDB-Inertia/PhyzmoCV

Repository files navigation

Google Cloud Video Intelligence API Python Samples

https://gstatic.com/cloudssh/images/open-btn.png

This directory contains samples for Google Cloud Video Intelligence API. Google Cloud Video Intelligence API allows developers to easily integrate feature detection in video.

Setup

Authentication

This sample requires you to have authentication setup. Refer to the Authentication Getting Started Guide for instructions on setting up credentials for applications.

Install Dependencies

  1. Clone python-docs-samples and change directory to the sample directory you want to use.

    $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
  2. 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.

  3. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.

    $ virtualenv env
    $ source env/bin/activate
  4. Install the dependencies needed to run the samples.

    $ pip install -r requirements.txt

Samples

analyze

https://gstatic.com/cloudssh/images/open-btn.png

To run this sample:

$ python analyze.py

usage: analyze.py [-h] {labels,labels_file,explicit_content,shots} ...

This application demonstrates label detection,
explicit content, and shot change detection using the Google Cloud API.

Usage Examples:

    python analyze.py labels gs://cloud-ml-sandbox/video/chicago.mp4
    python analyze.py labels_file resources/cat.mp4
    python analyze.py shots gs://cloud-samples-data/video/gbikes_dinosaur.mp4
    python analyze.py explicit_content gs://cloud-samples-data/video/gbikes_dinosaur.mp4

positional arguments:
  {labels,labels_file,explicit_content,shots}
    labels              Detects labels given a GCS path.
    labels_file         Detect labels given a file path.
    explicit_content    Detects explicit content from the GCS path to a video.
    shots               Detects camera shot changes.

optional arguments:
  -h, --help            show this help message and exit

beta samples

https://gstatic.com/cloudssh/images/open-btn.png

To run this sample:

$ python beta_snippets.py

usage: beta_snippets.py [-h]
                        {transcription,video-text-gcs,video-text,track-objects-gcs,track-objects}
                        ...

This application demonstrates speech transcription using the
Google Cloud API.

Usage Examples:
    python beta_snippets.py transcription         gs://python-docs-samples-tests/video/googlework_short.mp4
    python beta_snippets.py video-text-gcs         gs://python-docs-samples-tests/video/googlework_short.mp4
    python beta_snippets.py track-objects /resources/cat.mp4

positional arguments:
  {transcription,video-text-gcs,video-text,track-objects-gcs,track-objects}
    transcription       Transcribe speech from a video stored on GCS.
    video-text-gcs      Detect text in a video stored on GCS.
    video-text          Detect text in a local video.
    track-objects-gcs   Object Tracking.
    track-objects       Object Tracking.

optional arguments:
  -h, --help            show this help message and exit

The client library

This 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages