Пример #1
0
def sample_classify(video, location):
    # Create a client
    client = molluscclient.MolluscServiceClient()

    # Initialize request argument(s)
    classify_target = molluscclient.ClassifyTarget()

    # video = "path/to/mollusc/video.mkv"
    with open(video, "rb") as f:
        classify_target.video = f.read()

    # location = "New Zealand"
    classify_target.location_annotation = location

    request = molluscclient.molluscs.v1.ClassifyRequest(
        classify_target=classify_target, )

    # Make the request
    client.classify(request=request)
def sample_classify(video, location):
    """Determine the full taxonomy of input mollusc"""

    # Create a client
    client = molluscclient.MolluscServiceClient()

    # Initialize request argument(s)
    classify_target = {}
    # video = "path/to/mollusc/video.mkv"
    with open(video, "rb") as f:
        classify_target["video"] = f.read()

    # location = "New Zealand"
    classify_target["location_annotation"] = location

    request = molluscclient.molluscs.v1.ClassifyRequest(
        classify_target=classify_target, )

    # Make the request
    response = client.classify(request=request)