Quickstart

See a live example of PySDK, demonstrating live inferencing and rapid deployment.

to see how easy creating applications can be with PySDK. To run this example, you do not need to install anything — you only need to register for an account on our AI Hub to access all of our AI Hub's features. In Google Colab, we demonstrate how to create an AI Hub token, access the AI Hub with PySDK, and run AI Hub inferencing on an image.

If you would like to see more Google Colab examples, go to our Google Colab repository hosted on GitHub.

Example Code:

import degirum as dg

# Declaring variables
# Set your model name, inference host address, model zoo, and AI Hub token.
your_model_name = "model-name"
your_host_address = "@cloud" # Can be "@cloud", host:port, or "@local"
your_model_zoo = "degirum/public"
your_token = "<token>"

# Specify a path to your image file
your_image = "<path to your image>"

# Loading a model
model = dg.load_model(
    model_name = your_model_name, 
    inference_host_address = your_host_address, 
    zoo_url = your_model_zoo, 
    token = your_token 
    # optional parameters, such as output_confidence_threshold=0.5
)

# Perform AI model inference on your image
inference_result = model(your_image)

# Print the inference result
print(inference_result)

To learn more about PySDK, such as installing and running it locally, proceed to pages like PySDK Installation.

Last updated

Was this helpful?