Using Pretrained Models

You can use Document Understanding from the Console, the CLI, or API to analyze documents.

Document Understanding provides pretrained models for customers to extract insights about their images and documents without needing Data Scientists.

You need the following before using a pretrained model:

  • A paid tenancy account in Oracle Cloud Infrastructure.

  • Familiarity with Oracle Cloud Infrastructure Object Storage to load data to.

  • Policies set up to use Document Understanding and Object Storage. More information on policies is in the About Document Understanding Policies section.
  • To use a pretrained model in the Console, follow these steps:

    1. On the Document Understanding page, under Pretrained Models on the leftmost navigation menu, select the model you want to use (for example, Text Detection). This invokes the analyzeDocument API after the document is provided.
    2. Select the document source, one of Demo files, Local files, or Object storage.
    3. If in step 2, you selected Local file, or Object storage, you're prompted for the output location:
      1. Select the Compartment.
      2. Select the Output object storage location.
      3. If wanted, add a prefix.
      4. Click Submit.
      When you select the file, the model then runs.
    4. If in step 2, you selected Local file, drag the file to Upload Image, click select one... to pick a file from the file system.
      When you select the file, the model then runs.
  • Use the create command and required parameters to use a pretrained model asynchronously:

    oci ai-document processor-job create [OPTIONS]

    Use the analyze-document command and required parameters to use a pretrained model synchronously:

    oci ai-document analyze-document-result analyze-document [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the CreateProcessorJob operation to use a pretrained model asynchronously in the API.

    Run the AnalyzeDocument operation to use a pretrained model synchronously in the API.