google-cloud-video_intelligence 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -7
- data/lib/google/cloud/video_intelligence.rb +109 -0
- data/lib/google/cloud/video_intelligence/credentials.rb +29 -0
- data/lib/google/cloud/video_intelligence/v1beta1/video_intelligence_service_client.rb +1 -1
- data/lib/google/cloud/video_intelligence/v1beta2.rb +100 -0
- data/lib/google/cloud/video_intelligence/v1beta2/doc/google/cloud/videointelligence/v1beta2/video_intelligence.rb +370 -0
- data/lib/google/cloud/video_intelligence/v1beta2/doc/google/protobuf/any.rb +114 -0
- data/lib/google/cloud/video_intelligence/v1beta2/doc/google/protobuf/duration.rb +77 -0
- data/lib/google/cloud/video_intelligence/v1beta2/doc/google/rpc/status.rb +83 -0
- data/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service_client.rb +285 -0
- data/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service_client_config.json +31 -0
- data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb +166 -0
- data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb +48 -0
- metadata +58 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0528c58f3c19e758c482d7b308194497a8a2d271'
|
4
|
+
data.tar.gz: 50ae9c0cbed07324df3fe5cfa3de8421022b469c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98aa437537080fd57492fcf4161167d357d9e34227f33dd482db23b9e1a1d1f5522510faa22bc0d422c89867a9e04f1a260e7c43cd6c451fa31bc1b3c2a815d9
|
7
|
+
data.tar.gz: 1c705eca2f8940bf5c9653d40a62e8f055807cb59b40a11d0f39cf1e9cea848e3ed563d3d1561a11922bf082d84a17e5ef66aab289b7dee70584aecc904da107
|
data/README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
# Ruby Client for Google Cloud Video Intelligence API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
2
2
|
|
3
|
-
|
3
|
+
[Google Cloud Video Intelligence API][Product Documentation]:
|
4
|
+
Google Cloud Video Intelligence API.
|
4
5
|
- [Client Library Documentation][]
|
5
6
|
- [Product Documentation][]
|
6
7
|
|
7
8
|
## Quick Start
|
8
|
-
In order to use this library, you first need to go through the following
|
9
|
+
In order to use this library, you first need to go through the following
|
10
|
+
steps:
|
9
11
|
|
10
12
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
11
|
-
2. [Enable the
|
13
|
+
2. [Enable the Google Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
|
12
14
|
3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
13
15
|
|
14
16
|
### Installation
|
@@ -17,9 +19,12 @@ $ gem install google-cloud-video_intelligence
|
|
17
19
|
```
|
18
20
|
|
19
21
|
### Next Steps
|
20
|
-
- Read the [Client Library Documentation][] for Google Cloud Video Intelligence API
|
21
|
-
|
22
|
-
-
|
22
|
+
- Read the [Client Library Documentation][] for Google Cloud Video Intelligence API
|
23
|
+
to see other available methods on the client.
|
24
|
+
- Read the [Google Cloud Video Intelligence API Product documentation][Product Documentation]
|
25
|
+
to learn more about the product and see How-to Guides.
|
26
|
+
- View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
27
|
+
to see the full list of Cloud APIs that we cover.
|
23
28
|
|
24
|
-
[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/
|
29
|
+
[Client Library Documentation]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1beta2
|
25
30
|
[Product Documentation]: https://cloud.google.com/video-intelligence
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Copyright 2017, Google Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/gax"
|
16
|
+
require "pathname"
|
17
|
+
|
18
|
+
module Google
|
19
|
+
module Cloud
|
20
|
+
# rubocop:disable LineLength
|
21
|
+
|
22
|
+
##
|
23
|
+
# # Ruby Client for Google Cloud Video Intelligence API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
24
|
+
#
|
25
|
+
# [Google Cloud Video Intelligence API][Product Documentation]:
|
26
|
+
# Google Cloud Video Intelligence API.
|
27
|
+
# - [Product Documentation][]
|
28
|
+
#
|
29
|
+
# ## Quick Start
|
30
|
+
# In order to use this library, you first need to go through the following
|
31
|
+
# steps:
|
32
|
+
#
|
33
|
+
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
34
|
+
# 2. [Enable the Google Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
|
35
|
+
# 3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
36
|
+
#
|
37
|
+
# ### Installation
|
38
|
+
# ```
|
39
|
+
# $ gem install google-cloud-video_intelligence
|
40
|
+
# ```
|
41
|
+
#
|
42
|
+
# ### Next Steps
|
43
|
+
# - Read the [Google Cloud Video Intelligence API Product documentation][Product Documentation]
|
44
|
+
# to learn more about the product and see How-to Guides.
|
45
|
+
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
46
|
+
# to see the full list of Cloud APIs that we cover.
|
47
|
+
#
|
48
|
+
# [Product Documentation]: https://cloud.google.com/video-intelligence
|
49
|
+
#
|
50
|
+
#
|
51
|
+
module VideoIntelligence
|
52
|
+
# rubocop:enable LineLength
|
53
|
+
|
54
|
+
FILE_DIR = File.realdirpath(Pathname.new(__FILE__).join("..").join("video_intelligence"))
|
55
|
+
|
56
|
+
AVAILABLE_VERSIONS = Dir["#{FILE_DIR}/*"]
|
57
|
+
.select {|file| File.directory?(file)}
|
58
|
+
.select {|dir| Google::Gax::VERSION_MATCHER.match(File.basename(dir))}
|
59
|
+
.select {|dir| File.exist?(dir + ".rb")}
|
60
|
+
.map {|dir| File.basename(dir)}
|
61
|
+
|
62
|
+
##
|
63
|
+
# Service that implements Google Cloud Video Intelligence API.
|
64
|
+
#
|
65
|
+
# @overload self.new(version: :v1beta2, credentials: nil, scopes: nil, client_config: nil, timeout: nil)
|
66
|
+
# @param version [Symbol, String]
|
67
|
+
# The major version of the service to be used. By default :v1beta2
|
68
|
+
# is used.
|
69
|
+
# @param credentials
|
70
|
+
# [Google::Gax::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
71
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
72
|
+
# be many types.
|
73
|
+
# A `Google::Gax::Credentials` uses a the properties of its represented keyfile for
|
74
|
+
# authenticating requests made by this client.
|
75
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
76
|
+
# credentials for this client.
|
77
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
78
|
+
# credentials for this client.
|
79
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
80
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
81
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
82
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
83
|
+
# metadata for requests, generally, to give OAuth credentials.
|
84
|
+
# @param scopes [Array<String>]
|
85
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
86
|
+
# an updater_proc is supplied.
|
87
|
+
# @param client_config [Hash]
|
88
|
+
# A Hash for call options for each method. See
|
89
|
+
# Google::Gax#construct_settings for the structure of
|
90
|
+
# this data. Falls back to the default config if not specified
|
91
|
+
# or the specified config is missing data points.
|
92
|
+
# @param timeout [Numeric]
|
93
|
+
# The default timeout, in seconds, for calls made through this client.
|
94
|
+
def self.new(*args, version: :v1beta2, **kwargs)
|
95
|
+
unless AVAILABLE_VERSIONS.include?(version.to_s.downcase)
|
96
|
+
raise "The version: #{version} is not available. The available versions " \
|
97
|
+
"are: [#{AVAILABLE_VERSIONS.join(", ")}]"
|
98
|
+
end
|
99
|
+
|
100
|
+
require "#{FILE_DIR}/#{version.to_s.downcase}"
|
101
|
+
version_module = Google::Cloud::VideoIntelligence
|
102
|
+
.constants
|
103
|
+
.select {|sym| sym.to_s.downcase == version.to_s.downcase}
|
104
|
+
.first
|
105
|
+
Google::Cloud::VideoIntelligence.const_get(version_module).new(*args, **kwargs)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Copyright 2017, Google Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/gax"
|
16
|
+
|
17
|
+
module Google
|
18
|
+
module Cloud
|
19
|
+
module VideoIntelligence
|
20
|
+
class Credentials < Google::Gax::Credentials
|
21
|
+
SCOPE = [
|
22
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
23
|
+
].freeze
|
24
|
+
PATH_ENV_VARS = %w(VIDEO_INTELLIGENCE_KEYFILE, GOOGLE_CLOUD_KEYFILE, GCLOUD_KEYFILE)
|
25
|
+
JSON_ENV_VARS = %w(VIDEO_INTELLIGENCE_KEYFILE_JSON, GOOGLE_CLOUD_KEYFILE_JSON, GCLOUD_KEYFILE_JSON)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -70,7 +70,7 @@ module Google
|
|
70
70
|
# @param scopes [Array<String>]
|
71
71
|
# The OAuth scopes for this service. This parameter is ignored if
|
72
72
|
# an updater_proc is supplied.
|
73
|
-
# @param client_config[Hash]
|
73
|
+
# @param client_config [Hash]
|
74
74
|
# A Hash for call options for each method. See
|
75
75
|
# Google::Gax#construct_settings for the structure of
|
76
76
|
# this data. Falls back to the default config if not specified
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# Copyright 2017, Google Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require "google/cloud/video_intelligence/v1beta2/video_intelligence_service_client"
|
16
|
+
|
17
|
+
module Google
|
18
|
+
module Cloud
|
19
|
+
# rubocop:disable LineLength
|
20
|
+
|
21
|
+
##
|
22
|
+
# # Ruby Client for Google Cloud Video Intelligence API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
23
|
+
#
|
24
|
+
# [Google Cloud Video Intelligence API][Product Documentation]:
|
25
|
+
# Google Cloud Video Intelligence API.
|
26
|
+
# - [Product Documentation][]
|
27
|
+
#
|
28
|
+
# ## Quick Start
|
29
|
+
# In order to use this library, you first need to go through the following
|
30
|
+
# steps:
|
31
|
+
#
|
32
|
+
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
33
|
+
# 2. [Enable the Google Cloud Video Intelligence API.](https://console.cloud.google.com/apis/api/video-intelligence)
|
34
|
+
# 3. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
35
|
+
#
|
36
|
+
# ### Installation
|
37
|
+
# ```
|
38
|
+
# $ gem install google-cloud-video_intelligence
|
39
|
+
# ```
|
40
|
+
#
|
41
|
+
# ### Next Steps
|
42
|
+
# - Read the [Google Cloud Video Intelligence API Product documentation][Product Documentation]
|
43
|
+
# to learn more about the product and see How-to Guides.
|
44
|
+
# - View this [repository's main README](https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/README.md)
|
45
|
+
# to see the full list of Cloud APIs that we cover.
|
46
|
+
#
|
47
|
+
# [Product Documentation]: https://cloud.google.com/video-intelligence
|
48
|
+
#
|
49
|
+
#
|
50
|
+
module VideoIntelligence
|
51
|
+
##
|
52
|
+
# # Google Cloud Video Intelligence API Contents
|
53
|
+
#
|
54
|
+
# | Class | Description |
|
55
|
+
# | ----- | ----------- |
|
56
|
+
# | [VideoIntelligenceServiceClient][] | Google Cloud Video Intelligence API. |
|
57
|
+
# | [Data Types][] | Data types for Google::Cloud::VideoIntelligence::V1beta2 |
|
58
|
+
#
|
59
|
+
# [VideoIntelligenceServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1beta2/v1beta2/videointelligenceserviceclient
|
60
|
+
# [Data Types]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-video_intelligence/latest/google/cloud/videointelligence/v1beta2/v1beta2/datatypes
|
61
|
+
#
|
62
|
+
module V1beta2
|
63
|
+
# rubocop:enable LineLength
|
64
|
+
|
65
|
+
##
|
66
|
+
# Service that implements Google Cloud Video Intelligence API.
|
67
|
+
#
|
68
|
+
# @overload self.new(credentials: nil, scopes: nil, client_config: nil, timeout: nil)
|
69
|
+
# @param credentials
|
70
|
+
# [Google::Gax::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
71
|
+
# Provides the means for authenticating requests made by the client. This parameter can
|
72
|
+
# be many types.
|
73
|
+
# A `Google::Gax::Credentials` uses a the properties of its represented keyfile for
|
74
|
+
# authenticating requests made by this client.
|
75
|
+
# A `String` will be treated as the path to the keyfile to be used for the construction of
|
76
|
+
# credentials for this client.
|
77
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the construction of
|
78
|
+
# credentials for this client.
|
79
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
80
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The channel credentials
|
81
|
+
# should already be composed with a `GRPC::Core::CallCredentials` object.
|
82
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc transforms the
|
83
|
+
# metadata for requests, generally, to give OAuth credentials.
|
84
|
+
# @param scopes [Array<String>]
|
85
|
+
# The OAuth scopes for this service. This parameter is ignored if
|
86
|
+
# an updater_proc is supplied.
|
87
|
+
# @param client_config [Hash]
|
88
|
+
# A Hash for call options for each method. See
|
89
|
+
# Google::Gax#construct_settings for the structure of
|
90
|
+
# this data. Falls back to the default config if not specified
|
91
|
+
# or the specified config is missing data points.
|
92
|
+
# @param timeout [Numeric]
|
93
|
+
# The default timeout, in seconds, for calls made through this client.
|
94
|
+
def self.new(*args, **kwargs)
|
95
|
+
Google::Cloud::VideoIntelligence::V1beta2::VideoIntelligenceServiceClient.new(*args, **kwargs)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,370 @@
|
|
1
|
+
# Copyright 2017, Google Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Cloud
|
17
|
+
module Videointelligence
|
18
|
+
module V1beta2
|
19
|
+
# Video annotation request.
|
20
|
+
# @!attribute [rw] input_uri
|
21
|
+
# @return [String]
|
22
|
+
# Input video location. Currently, only
|
23
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/) URIs are
|
24
|
+
# supported, which must be specified in the following format:
|
25
|
+
# +gs://bucket-id/object-id+ (other URI formats return
|
26
|
+
# {Google::Rpc::Code::INVALID_ARGUMENT}). For more information, see
|
27
|
+
# [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
|
28
|
+
# A video URI may include wildcards in +object-id+, and thus identify
|
29
|
+
# multiple videos. Supported wildcards: '*' to match 0 or more characters;
|
30
|
+
# '?' to match 1 character. If unset, the input video should be embedded
|
31
|
+
# in the request as +input_content+. If set, +input_content+ should be unset.
|
32
|
+
# @!attribute [rw] input_content
|
33
|
+
# @return [String]
|
34
|
+
# The video data bytes. Encoding: base64. If unset, the input video(s)
|
35
|
+
# should be specified via +input_uri+. If set, +input_uri+ should be unset.
|
36
|
+
# @!attribute [rw] features
|
37
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::Feature>]
|
38
|
+
# Requested video annotation features.
|
39
|
+
# @!attribute [rw] video_context
|
40
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::VideoContext]
|
41
|
+
# Additional video context and/or feature-specific parameters.
|
42
|
+
# @!attribute [rw] output_uri
|
43
|
+
# @return [String]
|
44
|
+
# Optional location where the output (in JSON format) should be stored.
|
45
|
+
# Currently, only [Google Cloud Storage](https://cloud.google.com/storage/)
|
46
|
+
# URIs are supported, which must be specified in the following format:
|
47
|
+
# +gs://bucket-id/object-id+ (other URI formats return
|
48
|
+
# {Google::Rpc::Code::INVALID_ARGUMENT}). For more information, see
|
49
|
+
# [Request URIs](https://cloud.google.com/storage/docs/reference-uris).
|
50
|
+
# @!attribute [rw] location_id
|
51
|
+
# @return [String]
|
52
|
+
# Optional cloud region where annotation should take place. Supported cloud
|
53
|
+
# regions: +us-east1+, +us-west1+, +europe-west1+, +asia-east1+. If no region
|
54
|
+
# is specified, a region will be determined based on video file location.
|
55
|
+
class AnnotateVideoRequest; end
|
56
|
+
|
57
|
+
# Video context and/or feature-specific parameters.
|
58
|
+
# @!attribute [rw] segments
|
59
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoSegment>]
|
60
|
+
# Video segments to annotate. The segments may overlap and are not required
|
61
|
+
# to be contiguous or span the whole video. If unspecified, each video
|
62
|
+
# is treated as a single segment.
|
63
|
+
# @!attribute [rw] label_detection_config
|
64
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::LabelDetectionConfig]
|
65
|
+
# Config for LABEL_DETECTION.
|
66
|
+
# @!attribute [rw] shot_change_detection_config
|
67
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::ShotChangeDetectionConfig]
|
68
|
+
# Config for SHOT_CHANGE_DETECTION.
|
69
|
+
# @!attribute [rw] explicit_content_detection_config
|
70
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::ExplicitContentDetectionConfig]
|
71
|
+
# Config for EXPLICIT_CONTENT_DETECTION.
|
72
|
+
# @!attribute [rw] face_detection_config
|
73
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::FaceDetectionConfig]
|
74
|
+
# Config for FACE_DETECTION.
|
75
|
+
class VideoContext; end
|
76
|
+
|
77
|
+
# Config for LABEL_DETECTION.
|
78
|
+
# @!attribute [rw] label_detection_mode
|
79
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::LabelDetectionMode]
|
80
|
+
# What labels should be detected with LABEL_DETECTION, in addition to
|
81
|
+
# video-level labels or segment-level labels.
|
82
|
+
# If unspecified, defaults to +SHOT_MODE+.
|
83
|
+
# @!attribute [rw] stationary_camera
|
84
|
+
# @return [true, false]
|
85
|
+
# Whether the video has been shot from a stationary (i.e. non-moving) camera.
|
86
|
+
# When set to true, might improve detection accuracy for moving objects.
|
87
|
+
# Should be used with +SHOT_AND_FRAME_MODE+ enabled.
|
88
|
+
# @!attribute [rw] model
|
89
|
+
# @return [String]
|
90
|
+
# Model to use for label detection.
|
91
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
92
|
+
# "builtin/latest".
|
93
|
+
class LabelDetectionConfig; end
|
94
|
+
|
95
|
+
# Config for SHOT_CHANGE_DETECTION.
|
96
|
+
# @!attribute [rw] model
|
97
|
+
# @return [String]
|
98
|
+
# Model to use for shot change detection.
|
99
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
100
|
+
# "builtin/latest".
|
101
|
+
class ShotChangeDetectionConfig; end
|
102
|
+
|
103
|
+
# Config for EXPLICIT_CONTENT_DETECTION.
|
104
|
+
# @!attribute [rw] model
|
105
|
+
# @return [String]
|
106
|
+
# Model to use for explicit content detection.
|
107
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
108
|
+
# "builtin/latest".
|
109
|
+
class ExplicitContentDetectionConfig; end
|
110
|
+
|
111
|
+
# Config for FACE_DETECTION.
|
112
|
+
# @!attribute [rw] model
|
113
|
+
# @return [String]
|
114
|
+
# Model to use for face detection.
|
115
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
116
|
+
# "builtin/latest".
|
117
|
+
# @!attribute [rw] include_bounding_boxes
|
118
|
+
# @return [true, false]
|
119
|
+
# Whether bounding boxes be included in the face annotation output.
|
120
|
+
class FaceDetectionConfig; end
|
121
|
+
|
122
|
+
# Video segment.
|
123
|
+
# @!attribute [rw] start_time_offset
|
124
|
+
# @return [Google::Protobuf::Duration]
|
125
|
+
# Time-offset, relative to the beginning of the video,
|
126
|
+
# corresponding to the start of the segment (inclusive).
|
127
|
+
# @!attribute [rw] end_time_offset
|
128
|
+
# @return [Google::Protobuf::Duration]
|
129
|
+
# Time-offset, relative to the beginning of the video,
|
130
|
+
# corresponding to the end of the segment (inclusive).
|
131
|
+
class VideoSegment; end
|
132
|
+
|
133
|
+
# Video segment level annotation results for label detection.
|
134
|
+
# @!attribute [rw] segment
|
135
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::VideoSegment]
|
136
|
+
# Video segment where a label was detected.
|
137
|
+
# @!attribute [rw] confidence
|
138
|
+
# @return [Float]
|
139
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
140
|
+
class LabelSegment; end
|
141
|
+
|
142
|
+
# Video frame level annotation results for label detection.
|
143
|
+
# @!attribute [rw] time_offset
|
144
|
+
# @return [Google::Protobuf::Duration]
|
145
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
146
|
+
# video frame for this location.
|
147
|
+
# @!attribute [rw] confidence
|
148
|
+
# @return [Float]
|
149
|
+
# Confidence that the label is accurate. Range: [0, 1].
|
150
|
+
class LabelFrame; end
|
151
|
+
|
152
|
+
# Detected entity from video analysis.
|
153
|
+
# @!attribute [rw] entity_id
|
154
|
+
# @return [String]
|
155
|
+
# Opaque entity ID. Some IDs may be available in
|
156
|
+
# [Google Knowledge Graph Search
|
157
|
+
# API](https://developers.google.com/knowledge-graph/).
|
158
|
+
# @!attribute [rw] description
|
159
|
+
# @return [String]
|
160
|
+
# Textual description, e.g. +Fixed-gear bicycle+.
|
161
|
+
# @!attribute [rw] language_code
|
162
|
+
# @return [String]
|
163
|
+
# Language code for +description+ in BCP-47 format.
|
164
|
+
class Entity; end
|
165
|
+
|
166
|
+
# Label annotation.
|
167
|
+
# @!attribute [rw] entity
|
168
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::Entity]
|
169
|
+
# Detected entity.
|
170
|
+
# @!attribute [rw] category_entities
|
171
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::Entity>]
|
172
|
+
# Common categories for the detected entity.
|
173
|
+
# E.g. when the label is +Terrier+ the category is likely +dog+. And in some
|
174
|
+
# cases there might be more than one categories e.g. +Terrier+ could also be
|
175
|
+
# a +pet+.
|
176
|
+
# @!attribute [rw] segments
|
177
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelSegment>]
|
178
|
+
# All video segments where a label was detected.
|
179
|
+
# @!attribute [rw] frames
|
180
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelFrame>]
|
181
|
+
# All video frames where a label was detected.
|
182
|
+
class LabelAnnotation; end
|
183
|
+
|
184
|
+
# Video frame level annotation results for explicit content.
|
185
|
+
# @!attribute [rw] time_offset
|
186
|
+
# @return [Google::Protobuf::Duration]
|
187
|
+
# Time-offset, relative to the beginning of the video, corresponding to the
|
188
|
+
# video frame for this location.
|
189
|
+
# @!attribute [rw] pornography_likelihood
|
190
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::Likelihood]
|
191
|
+
# Likelihood of the pornography content..
|
192
|
+
class ExplicitContentFrame; end
|
193
|
+
|
194
|
+
# Explicit content annotation (based on per-frame visual signals only).
|
195
|
+
# If no explicit content has been detected in a frame, no annotations are
|
196
|
+
# present for that frame.
|
197
|
+
# @!attribute [rw] frames
|
198
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::ExplicitContentFrame>]
|
199
|
+
# All video frames where explicit content was detected.
|
200
|
+
class ExplicitContentAnnotation; end
|
201
|
+
|
202
|
+
# Normalized bounding box.
|
203
|
+
# The normalized vertex coordinates are relative to the original image.
|
204
|
+
# Range: [0, 1].
|
205
|
+
# @!attribute [rw] left
|
206
|
+
# @return [Float]
|
207
|
+
# Left X coordinate.
|
208
|
+
# @!attribute [rw] top
|
209
|
+
# @return [Float]
|
210
|
+
# Top Y coordinate.
|
211
|
+
# @!attribute [rw] right
|
212
|
+
# @return [Float]
|
213
|
+
# Right X coordinate.
|
214
|
+
# @!attribute [rw] bottom
|
215
|
+
# @return [Float]
|
216
|
+
# Bottom Y coordinate.
|
217
|
+
class NormalizedBoundingBox; end
|
218
|
+
|
219
|
+
# Video segment level annotation results for face detection.
|
220
|
+
# @!attribute [rw] segment
|
221
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::VideoSegment]
|
222
|
+
# Video segment where a face was detected.
|
223
|
+
class FaceSegment; end
|
224
|
+
|
225
|
+
# Video frame level annotation results for face detection.
|
226
|
+
# @!attribute [rw] normalized_bounding_boxes
|
227
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::NormalizedBoundingBox>]
|
228
|
+
# Normalized Bounding boxes in a frame.
|
229
|
+
# There can be more than one boxes if the same face is detected in multiple
|
230
|
+
# locations within the current frame.
|
231
|
+
# @!attribute [rw] time_offset
|
232
|
+
# @return [Google::Protobuf::Duration]
|
233
|
+
# Time-offset, relative to the beginning of the video,
|
234
|
+
# corresponding to the video frame for this location.
|
235
|
+
class FaceFrame; end
|
236
|
+
|
237
|
+
# Face annotation.
|
238
|
+
# @!attribute [rw] thumbnail
|
239
|
+
# @return [String]
|
240
|
+
# Thumbnail of a representative face view (in JPEG format). Encoding: base64.
|
241
|
+
# @!attribute [rw] segments
|
242
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::FaceSegment>]
|
243
|
+
# All video segments where a face was detected.
|
244
|
+
# @!attribute [rw] frames
|
245
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::FaceFrame>]
|
246
|
+
# All video frames where a face was detected.
|
247
|
+
class FaceAnnotation; end
|
248
|
+
|
249
|
+
# Annotation results for a single video.
|
250
|
+
# @!attribute [rw] input_uri
|
251
|
+
# @return [String]
|
252
|
+
# Video file location in
|
253
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
254
|
+
# @!attribute [rw] segment_label_annotations
|
255
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelAnnotation>]
|
256
|
+
# Label annotations on video level or user specified segment level.
|
257
|
+
# There is exactly one element for each unique label.
|
258
|
+
# @!attribute [rw] shot_label_annotations
|
259
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelAnnotation>]
|
260
|
+
# Label annotations on shot level.
|
261
|
+
# There is exactly one element for each unique label.
|
262
|
+
# @!attribute [rw] frame_label_annotations
|
263
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::LabelAnnotation>]
|
264
|
+
# Label annotations on frame level.
|
265
|
+
# There is exactly one element for each unique label.
|
266
|
+
# @!attribute [rw] face_annotations
|
267
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::FaceAnnotation>]
|
268
|
+
# Face annotations. There is exactly one element for each unique face.
|
269
|
+
# @!attribute [rw] shot_annotations
|
270
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoSegment>]
|
271
|
+
# Shot annotations. Each shot is represented as a video segment.
|
272
|
+
# @!attribute [rw] explicit_annotation
|
273
|
+
# @return [Google::Cloud::Videointelligence::V1beta2::ExplicitContentAnnotation]
|
274
|
+
# Explicit content annotation.
|
275
|
+
# @!attribute [rw] error
|
276
|
+
# @return [Google::Rpc::Status]
|
277
|
+
# If set, indicates an error. Note that for a single +AnnotateVideoRequest+
|
278
|
+
# some videos may succeed and some may fail.
|
279
|
+
class VideoAnnotationResults; end
|
280
|
+
|
281
|
+
# Video annotation response. Included in the +response+
|
282
|
+
# field of the +Operation+ returned by the +GetOperation+
|
283
|
+
# call of the +google::longrunning::Operations+ service.
|
284
|
+
# @!attribute [rw] annotation_results
|
285
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoAnnotationResults>]
|
286
|
+
# Annotation results for all videos specified in +AnnotateVideoRequest+.
|
287
|
+
class AnnotateVideoResponse; end
|
288
|
+
|
289
|
+
# Annotation progress for a single video.
|
290
|
+
# @!attribute [rw] input_uri
|
291
|
+
# @return [String]
|
292
|
+
# Video file location in
|
293
|
+
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
294
|
+
# @!attribute [rw] progress_percent
|
295
|
+
# @return [Integer]
|
296
|
+
# Approximate percentage processed thus far.
|
297
|
+
# Guaranteed to be 100 when fully processed.
|
298
|
+
# @!attribute [rw] start_time
|
299
|
+
# @return [Google::Protobuf::Timestamp]
|
300
|
+
# Time when the request was received.
|
301
|
+
# @!attribute [rw] update_time
|
302
|
+
# @return [Google::Protobuf::Timestamp]
|
303
|
+
# Time of the most recent update.
|
304
|
+
class VideoAnnotationProgress; end
|
305
|
+
|
306
|
+
# Video annotation progress. Included in the +metadata+
|
307
|
+
# field of the +Operation+ returned by the +GetOperation+
|
308
|
+
# call of the +google::longrunning::Operations+ service.
|
309
|
+
# @!attribute [rw] annotation_progress
|
310
|
+
# @return [Array<Google::Cloud::Videointelligence::V1beta2::VideoAnnotationProgress>]
|
311
|
+
# Progress metadata for all videos specified in +AnnotateVideoRequest+.
|
312
|
+
class AnnotateVideoProgress; end
|
313
|
+
|
314
|
+
# Video annotation feature.
|
315
|
+
module Feature
|
316
|
+
# Unspecified.
|
317
|
+
FEATURE_UNSPECIFIED = 0
|
318
|
+
|
319
|
+
# Label detection. Detect objects, such as dog or flower.
|
320
|
+
LABEL_DETECTION = 1
|
321
|
+
|
322
|
+
# Shot change detection.
|
323
|
+
SHOT_CHANGE_DETECTION = 2
|
324
|
+
|
325
|
+
# Explicit content detection.
|
326
|
+
EXPLICIT_CONTENT_DETECTION = 3
|
327
|
+
|
328
|
+
# Human face detection and tracking.
|
329
|
+
FACE_DETECTION = 4
|
330
|
+
end
|
331
|
+
|
332
|
+
# Label detection mode.
|
333
|
+
module LabelDetectionMode
|
334
|
+
# Unspecified.
|
335
|
+
LABEL_DETECTION_MODE_UNSPECIFIED = 0
|
336
|
+
|
337
|
+
# Detect shot-level labels.
|
338
|
+
SHOT_MODE = 1
|
339
|
+
|
340
|
+
# Detect frame-level labels.
|
341
|
+
FRAME_MODE = 2
|
342
|
+
|
343
|
+
# Detect both shot-level and frame-level labels.
|
344
|
+
SHOT_AND_FRAME_MODE = 3
|
345
|
+
end
|
346
|
+
|
347
|
+
# Bucketized representation of likelihood.
|
348
|
+
module Likelihood
|
349
|
+
# Unspecified likelihood.
|
350
|
+
LIKELIHOOD_UNSPECIFIED = 0
|
351
|
+
|
352
|
+
# Very unlikely.
|
353
|
+
VERY_UNLIKELY = 1
|
354
|
+
|
355
|
+
# Unlikely.
|
356
|
+
UNLIKELY = 2
|
357
|
+
|
358
|
+
# Possible.
|
359
|
+
POSSIBLE = 3
|
360
|
+
|
361
|
+
# Likely.
|
362
|
+
LIKELY = 4
|
363
|
+
|
364
|
+
# Very likely.
|
365
|
+
VERY_LIKELY = 5
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
370
|
+
end
|