[ 
https://issues.apache.org/jira/browse/BEAM-9146?focusedWorklogId=382194&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-382194
 ]

ASF GitHub Bot logged work on BEAM-9146:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Feb/20 10:53
            Start Date: 05/Feb/20 10:53
    Worklog Time Spent: 10m 
      Work Description: kamilwu commented on pull request #10764: [BEAM-9146] 
Integrate GCP Video Intelligence functionality for Python SDK
URL: https://github.com/apache/beam/pull/10764#discussion_r375186324
 
 

 ##########
 File path: sdks/python/apache_beam/io/gcp/ai/video_intelligence.py
 ##########
 @@ -0,0 +1,75 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+"""
+A connector for sending API requests to the GCP Video Intelligence API.
+"""
+from __future__ import absolute_import
+
+from typing import Union
+
+from apache_beam import typehints
+from apache_beam.io.gcp.ai import helper
+from apache_beam.metrics import Metrics
+from apache_beam.transforms import DoFn, ParDo, PTransform
+
+
+class AnnotateVideo(PTransform):
+  """A ``PTransform`` for annotating video using the GCP Video Intelligence API
+  ref: https://cloud.google.com/video-intelligence/docs
+  """
+
+  def __init__(self, features):
 
 Review comment:
   I think we should also accept other parameters, not only `features`.
   
   A must have is `video_context`, because sometimes it provides additional 
feature-specific parameters. Others are `location_id` and possibly `metadata`. 
Take a look at the interface of `annotate_video()`
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 382194)
    Time Spent: 1.5h  (was: 1h 20m)

> [Python] PTransform that integrates Video Intelligence functionality
> --------------------------------------------------------------------
>
>                 Key: BEAM-9146
>                 URL: https://issues.apache.org/jira/browse/BEAM-9146
>             Project: Beam
>          Issue Type: Sub-task
>          Components: io-py-gcp
>            Reporter: Kamil Wasilewski
>            Assignee: Kamil Wasilewski
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The goal is to create a PTransform that integrates Google Cloud Video 
> Intelligence functionality [1].
> The transform should be able to take both video GCS location or video data 
> bytes as an input.
> The transform should be put into _sdks/python/apache_beam/io/gcp/ai_ folder.
> [1] https://cloud.google.com/video-intelligence/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to