CustomVisionPredictionClient 類別

繼承
azure.cognitiveservices.vision.customvision.prediction.operations._custom_vision_prediction_client_operations.CustomVisionPredictionClientOperationsMixin
CustomVisionPredictionClient
CustomVisionPredictionClient

建構函式

CustomVisionPredictionClient(endpoint, credentials)

參數

endpoint
str
必要

支援的認知服務端點。

credentials
None
必要

可唯一識別用戶端訂用帳戶的訂用帳號憑證。

變數

config
CustomVisionPredictionClientConfiguration

用戶端的組態。

方法

classify_image

分類影像並儲存結果。

classify_image_url

分類影像 URL 並儲存結果。

classify_image_url_with_no_store

分類影像 URL 而不儲存結果。

classify_image_with_no_store

分類影像而不儲存結果。

close

如果keep_alive為 True,請關閉用戶端。

detect_image

偵測影像中的物件並儲存結果。

detect_image_url

偵測影像 URL 中的物件,並儲存結果。

detect_image_url_with_no_store

偵測影像 URL 中的物件,而不儲存結果。

detect_image_with_no_store

偵測影像中的物件,而不儲存結果。

classify_image

分類影像並儲存結果。

classify_image(project_id, published_name, image_data, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

image_data
Generator
必要

二進位影像資料。 支援的格式包括 JPEG、GIF、PNG 和 BMP。 支援最多 4MB 的映射。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況

classify_image_url

分類影像 URL 並儲存結果。

classify_image_url(project_id, published_name, url, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

url
str
必要

影像的 URL。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況

classify_image_url_with_no_store

分類影像 URL 而不儲存結果。

classify_image_url_with_no_store(project_id, published_name, url, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

url
str
必要

影像的 URL。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況

classify_image_with_no_store

分類影像而不儲存結果。

classify_image_with_no_store(project_id, published_name, image_data, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

image_data
Generator
必要

二進位影像資料。 支援的格式包括 JPEG、GIF、PNG 和 BMP。 支援最多 4MB 的映射。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況

close

如果keep_alive為 True,請關閉用戶端。

close() -> None

例外狀況

detect_image

偵測影像中的物件並儲存結果。

detect_image(project_id, published_name, image_data, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

image_data
Generator
必要

二進位影像資料。 支援的格式包括 JPEG、GIF、PNG 和 BMP。 支援最多 4MB 的映射。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況

detect_image_url

偵測影像 URL 中的物件,並儲存結果。

detect_image_url(project_id, published_name, url, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

url
str
必要

影像的 URL。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況

detect_image_url_with_no_store

偵測影像 URL 中的物件,而不儲存結果。

detect_image_url_with_no_store(project_id, published_name, url, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

url
str
必要

影像的 URL。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況

detect_image_with_no_store

偵測影像中的物件,而不儲存結果。

detect_image_with_no_store(project_id, published_name, image_data, application=None, custom_headers=None, raw=False, **operation_config)

參數

project_id
str
必要

專案識別碼。

published_name
str
必要

指定要評估的模型名稱。

image_data
Generator
必要

二進位影像資料。 支援的格式包括 JPEG、GIF、PNG 和 BMP。 支援最多 4MB 的映射。

application
str
預設值: None

選擇性。 使用端點指定應用程式的名稱。

custom_headers
dict
預設值: None

將新增至要求的標頭

raw
bool
預設值: False

傳回直接回應與還原序列化回應

operation_config
必要

作業組態覆寫

傳回

ImagePrediction 或 ClientRawResponse if raw=true

傳回類型

例外狀況