Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 6464f30

Browse files
feat(videointelligence): add person detection and face detection (#5)
1 parent 6a1df6a commit 6464f30

File tree

47 files changed

+1372
-571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1372
-571
lines changed

google/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/videointelligence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/videointelligence_v1/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,12 +16,23 @@
1616

1717

1818
from __future__ import absolute_import
19+
import sys
20+
import warnings
1921

2022
from google.cloud.videointelligence_v1 import types
2123
from google.cloud.videointelligence_v1.gapic import enums
2224
from google.cloud.videointelligence_v1.gapic import video_intelligence_service_client
2325

2426

27+
if sys.version_info[:2] == (2, 7):
28+
message = (
29+
"A future version of this library will drop support for Python 2.7."
30+
"More details about Python 2 support for Google Cloud Client Libraries"
31+
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
32+
)
33+
warnings.warn(message, DeprecationWarning)
34+
35+
2536
class VideoIntelligenceServiceClient(
2637
video_intelligence_service_client.VideoIntelligenceServiceClient
2738
):

google/cloud/videointelligence_v1/gapic/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/videointelligence_v1/gapic/transports/video_intelligence_service_grpc_transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/videointelligence_v1/gapic/video_intelligence_service_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -213,9 +213,9 @@ def annotate_video(
213213
>>>
214214
>>> client = videointelligence_v1.VideoIntelligenceServiceClient()
215215
>>>
216-
>>> input_uri = 'gs://cloud-samples-data/video/cat.mp4'
217216
>>> features_element = enums.Feature.LABEL_DETECTION
218217
>>> features = [features_element]
218+
>>> input_uri = 'gs://cloud-samples-data/video/cat.mp4'
219219
>>>
220220
>>> response = client.annotate_video(input_uri=input_uri, features=features)
221221
>>>
@@ -288,9 +288,9 @@ def annotate_video(
288288
)
289289

290290
request = video_intelligence_pb2.AnnotateVideoRequest(
291+
features=features,
291292
input_uri=input_uri,
292293
input_content=input_content,
293-
features=features,
294294
video_context=video_context,
295295
output_uri=output_uri,
296296
location_id=location_id,

google/cloud/videointelligence_v1/proto/video_intelligence_pb2.py

Lines changed: 30 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

google/cloud/videointelligence_v1/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

google/cloud/videointelligence_v1beta2/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@
1616

1717

1818
from __future__ import absolute_import
19+
import sys
20+
import warnings
1921

2022
from google.cloud.videointelligence_v1beta2 import types
2123
from google.cloud.videointelligence_v1beta2.gapic import enums
@@ -24,6 +26,15 @@
2426
)
2527

2628

29+
if sys.version_info[:2] == (2, 7):
30+
message = (
31+
"A future version of this library will drop support for Python 2.7."
32+
"More details about Python 2 support for Google Cloud Client Libraries"
33+
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
34+
)
35+
warnings.warn(message, DeprecationWarning)
36+
37+
2738
class VideoIntelligenceServiceClient(
2839
video_intelligence_service_client.VideoIntelligenceServiceClient
2940
):

0 commit comments

Comments
 (0)