airflow.providers.google.cloud.hooks.vision
¶
此模組包含 Google Cloud Vision Hook。
模組內容¶
類別¶
用於決定實體名稱的輔助類別。 |
|
Google Cloud Vision API 的 Hook。 |
屬性¶
- airflow.providers.google.cloud.hooks.vision.ERR_DIFF_NAMES = Multiline-String[原始碼]¶
顯示值
"""The {label} name provided in the object ({explicit_name}) is different than the name created from the input parameters ({constructed_name}). Please either: 1) Remove the {label} name, 2) Remove the location and {id_label} parameters, 3) Unify the {label} name and input parameters. """
- airflow.providers.google.cloud.hooks.vision.ERR_UNABLE_TO_CREATE = Multiline-String[原始碼]¶
顯示值
"""Unable to determine the {label} name. Please either set the name directly in the {label} object or provide the `location` and `{id_label}` parameters. """
- class airflow.providers.google.cloud.hooks.vision.NameDeterminer(label, id_label, get_path)[原始碼]¶
用於決定實體名稱的輔助類別。
- class airflow.providers.google.cloud.hooks.vision.CloudVisionHook(gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[原始碼]¶
基底類別:
airflow.providers.google.common.hooks.base_google.GoogleBaseHook
Google Cloud Vision API 的 Hook。
hook 中使用 project_id 的所有方法都必須使用關鍵字引數而非位置引數呼叫。
- get_conn()[原始碼]¶
擷取 Cloud Vision 的連線。
- 返回
Google Cloud Vision 用戶端物件。
- 返回類型
google.cloud.vision_v1.ProductSearchClient
- annotator_client()[原始碼]¶
建立 ImageAnnotatorClient。
- 返回
Google Image Annotator 用戶端物件。
- 返回類型
google.cloud.vision_v1.ImageAnnotatorClient
- create_product_set(location, product_set, project_id=PROVIDE_PROJECT_ID, product_set_id=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
建立產品集。
如需文件,請參閱:
CloudVisionCreateProductSetOperator
。
- get_product_set(location, product_set_id, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
取得產品集。
如需文件,請參閱:
CloudVisionGetProductSetOperator
。
- update_product_set(product_set, project_id=PROVIDE_PROJECT_ID, location=None, product_set_id=None, update_mask=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
更新產品集。
如需文件,請參閱:
CloudVisionUpdateProductSetOperator
。
- delete_product_set(location, product_set_id, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
刪除產品集。
如需文件,請參閱:
CloudVisionDeleteProductSetOperator
。
- create_product(location, product, project_id=PROVIDE_PROJECT_ID, product_id=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
建立產品。
如需文件,請參閱:
CloudVisionCreateProductOperator
。
- get_product(location, product_id, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
取得產品。
如需文件,請參閱:
CloudVisionGetProductOperator
。
- update_product(product, project_id=PROVIDE_PROJECT_ID, location=None, product_id=None, update_mask=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
更新產品。
如需文件,請參閱:
CloudVisionUpdateProductOperator
。
- delete_product(location, product_id, project_id=PROVIDE_PROJECT_ID, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
刪除產品。
如需文件,請參閱:
CloudVisionDeleteProductOperator
。
- create_reference_image(location, product_id, reference_image, project_id, reference_image_id=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
建立參考圖片。
如需文件,請參閱:
CloudVisionCreateReferenceImageOperator
。
- delete_reference_image(location, product_id, reference_image_id, project_id, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
刪除參考圖片。
如需文件,請參閱:
CloudVisionDeleteReferenceImageOperator
。
- add_product_to_product_set(product_set_id, product_id, project_id, location, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
將產品新增至產品集。
如需文件,請參閱:
CloudVisionAddProductToProductSetOperator
。
- remove_product_from_product_set(product_set_id, product_id, project_id, location, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
從產品集中移除產品。
如需文件,請參閱:
CloudVisionRemoveProductFromProductSetOperator
。
- annotate_image(request, retry=DEFAULT, timeout=None)[原始碼]¶
標註圖片。
如需文件,請參閱:
CloudVisionImageAnnotateOperator
。
- batch_annotate_images(requests, retry=DEFAULT, timeout=None)[原始碼]¶
批次標註圖片。
如需文件,請參閱:
CloudVisionImageAnnotateOperator
。
- text_detection(image, max_results=None, retry=DEFAULT, timeout=None, additional_properties=None)[原始碼]¶
文字偵測。
如需文件,請參閱:
CloudVisionDetectTextOperator
。
- document_text_detection(image, max_results=None, retry=DEFAULT, timeout=None, additional_properties=None)[原始碼]¶
文件文字偵測。
如需文件,請參閱:
CloudVisionTextDetectOperator
。
- label_detection(image, max_results=None, retry=DEFAULT, timeout=None, additional_properties=None)[原始碼]¶
標籤偵測。
文件請參閱:
CloudVisionDetectImageLabelsOperator
。
- safe_search_detection(image, max_results=None, retry=DEFAULT, timeout=None, additional_properties=None)[source]¶
安全搜尋偵測。
文件請參閱:
CloudVisionDetectImageSafeSearchOperator
。