18ec65e748271faa591204c51033156724a59e23,video/cloud-client/analyze/analyze.py,,analyze_explicit_content,#Any#,41

Before Change


    operation = video_client.annotate_video(path, features)
    print("\nProcessing video for explicit content annotations:")

    while not operation.done():
        sys.stdout.write(".")
        sys.stdout.flush()
        time.sleep(15)

    print("\nFinished processing.")

    // first result is retrieved because a single video was processed
    explicit_annotation = (operation.result().annotation_results[0].
                           explicit_annotation)

    likely_string = ("Unknown", "Very unlikely", "Unlikely", "Possible",
                     "Likely", "Very likely")

    for frame in explicit_annotation.frames:
        frame_time = frame.time_offset.seconds + frame.time_offset.nanos / 1e9
        print("Time: {}s".format(frame_time))
        print("\tpornography: {}".format(

After Change


    video_client = videointelligence.VideoIntelligenceServiceClient()
    features = [videointelligence.enums.Feature.EXPLICIT_CONTENT_DETECTION]

    operation = video_client.annotate_video(path, features=features)
    print("\nProcessing video for explicit content annotations:")

    result = operation.result(timeout=90)
    print("\nFinished processing.")

    likely_string = ("Unknown", "Very unlikely", "Unlikely", "Possible",
                     "Likely", "Very likely")

    // first result is retrieved because a single video was processed
    for frame in result.annotation_results[0].explicit_annotation.frames:
        frame_time = frame.time_offset.seconds + frame.time_offset.nanos / 1e9
        print("Time: {}s".format(frame_time))
        print("\tpornography: {}".format(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 19

Instances


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 18ec65e748271faa591204c51033156724a59e23
Time: 2017-11-29
Author: dizcology@hotmail.com
File Name: video/cloud-client/analyze/analyze.py
Class Name:
Method Name: analyze_explicit_content


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 18ec65e748271faa591204c51033156724a59e23
Time: 2017-11-29
Author: dizcology@hotmail.com
File Name: video/cloud-client/quickstart/quickstart.py
Class Name:
Method Name: run_quickstart


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 18ec65e748271faa591204c51033156724a59e23
Time: 2017-11-29
Author: dizcology@hotmail.com
File Name: video/cloud-client/labels/labels.py
Class Name:
Method Name: analyze_labels