開始使用人機迴圈

本快速入門導覽課程將介紹「人機迴圈」。在這個快速入門導覽課程中,您將透過 Google Cloud 控制台設定 Google Cloud 專案與授權、建立處理器,然後在該處理器上啟用專人審查。


如要直接在 Google Cloud 控制台按照逐步指南操作,請按一下「Guide me」(逐步引導)

逐步引導


事前準備

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Document AI, Cloud Storage, Vertex AI APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Document AI, Cloud Storage, Vertex AI APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains the serviceusage.services.enable permission. Learn how to grant roles.

    Enable the APIs

  8. 建立處理器

    注意:總覽頁面中列出的處理器支援人工審查工作流程。

    1. 按一下 Google Cloud 控制台導覽選單中的「Document AI」,然後選取「Processor Gallery」(處理器庫)處理器庫

    2. 在「Processor Gallery」(處理器庫) 搜尋「Invoice Parser」(應付憑據剖析器),然後選取「Create」(建立)

    3. 「Create processor」(建立處理器) 選單中,輸入處理器名稱,例如 my-invoice-processor

    4. 請選取最近的區域。

    5. 點選「Create」(建立)。系統隨即會將您導向新處理器的詳細資料頁面。

    在處理器上啟用人工審查

    1. 前往處理器的「Human-in-the-Loop」(人機迴圈) 分頁。

    2. 選取「Configure Human-in-the-Loop」(設定人機迴圈)

      圖片

    3. 「Select specialists」(選取專員) 清單中選取「Use my own specialists」(使用自己的專員)

    4. 「Labeler Pool」(標籤人員集區) 清單中,選取「New Specialist Pool」(新增專員集區)

      圖片

    5. 在彈出式對話方塊中輸入「Pool name」(集區名稱),例如 My Labeler Pool

      圖片

    6. 輸入「Pool managers」(集區管理員) 和「Specialists」(專員) 的電子郵件地址。

    7. 按一下「Create Pool」(建立集區)。這項作業需要幾秒鐘才能完成。

    8. (選用) 勾選 「Enable Auto-Assignment」(啟用自動指派) 方塊。

    9. 勾選「Confirm Charge」(確認費用) 方塊。

    10. 「Set filter」(設定篩選器) 專區中,選取「Document-level filter」(文件層級篩選器)

      1. (選用) 您也可以設定「Label-level filters」(標籤層級的篩選器),根據個別欄位進行篩選。
    11. 「Confidence threshold」(可信度門檻) 設為 100%。系統將傳送所有預測文件以進行人工審查。

      驗證方法

    12. 在「Add instructions」(新增指示) 專區,在「Instructions location」(操作說明位置) 欄位中輸入下列 Cloud Storage 路徑。

      這份 PDF 檔案包含預先建立的應付憑據剖析器操作說明。您也可以視需要自行建立操作說明

      cloud-samples-data/documentai/labeling-instructions/pretrained-invoice-v1.3-2022-07-15.pdf
      
    13. 「Results location」(結果位置) 欄位中,選取或建立人工審查輸出內容的值區。

    14. 按一下「Save Configuration」(儲存設定) 按鈕。這項作業需要幾秒鐘才能完成。

      圖片

    15. 設定完成之後,請選取「Enable Human-in-the-Loop」(啟用人機迴圈) 滑桿。

      圖片

    16. 在彈出式對話方塊中選取「Enable」(啟用)

    您已成功在應付憑據剖析器中設定人機迴圈。

    (選用) 管理標籤任務

    1. 完成設定人工審查後,您應該會收到類似以下的電子郵件:

      From: AI Platform <noreply-aiplatform@google.com>\
      Subject: Added to AI Platform SpecialistPool Test Labeler Group
      
      Hello AI Platform Customer,
      
      You are added as a manager to specialist pool
      cloudml_data_specialists_us_central1_785484070008756xxxx.
      To view details, visit Manager console
      https://datacompute.google.com/cm/
      
      Sincerely,
      The Google Cloud AI Team
      
    2. 請按照完成審查工作管理標籤工作的說明操作,使用人工審查控制台。

    後續步驟