Using a Pretrained Model in the Console

Vision provides pretrained models to extract insights from images, without needing Data Scientists.

In this tutorial you learn how to:

Before You Begin

Before you use Vision, your tenancy administrator must set up the appropriate policies.

Setting Up the Policies

Follow these steps to set up the policies needed to be able to use Vision.

  1. In the Console navigation menu, click Identity & Security.
  2. Under Identity, click Policies.
  3. Click Create Policy.
    The Create Policy panel is displayed.
  4. Enter a Name. You can use alphanumeric characters, hyphens, periods, and underscores only. Spaces are not allowed. For example, enter, vision-access-policy.
  5. Enter a Description to help other users know the purpose of this set of policies. For example, enter, Policy to access Vision service..
  6. Select the Compartment.
  7. In Policy Builder, click Show manual editor.
  8. Add the following statement:
    allow any-user to use ai-service-vision-family in tenancy
  9. (Optional) To limit access to your user group only, add the following policy instead:
    allow group <your-group-name> to use ai-service-vision-family in tenancy
  10. Click Create.

1. Understand Data Requirements

Vision works with many formats of image data to detect objects, assign labels to images, extract text, and more. It accepts data through Object Storage. If Vision is run in the Console, you can also provide locally stored images.

Vision offers synchronous and asynchronous APIs to analyze images. The data requirements for each are explained in the following table:
API Data Requirements
API Description Supported Input Format
Synchronous API
  • analyzeImage
  • analyzeDocument
Analyzes individual images.
  • JPG, PNG. PDF and TIFF are also supported with analyzeDocument
  • Up to 5 MB
  • Single image input
Asynchronous API Analyze several images or multi-page PDFs.
  • JPG, PNG. PDF and TIFF are also supported with analyzeDocument
  • Supports multi-page PDF
  • Up to 2,000 images input

2. Load Data to Object Storage

In this step, you load to Object Storage the images and documents you want to analyze.

Complete 1. Understand Data Requirements before trying this section.

Create an Object Storage Bucket

If you already have a bucket in Object Storage you can use, then go straight to the next section on loading image files.

  1. From the Console navigation menu, click Storage.
  2. Under Object Storage, click Buckets.
  3. In the Buckets page, under List Scope, select your Compartment.
  4. Click Create Bucket. The Create Bucket pane is displayed.
  5. Enter a Bucket Name. Avoid entering confidential information.
  6. Under Default Storage Tier, click Standard. Leave all the other fields at their default values.
  7. Click Create.

Load Image Files to the Object Storage Bucket

  1. In the Buckets page, click the name of the bucket you are going to load images into. The bucket's details page is displayed.
  2. Under Resources, click Objects to display the list of objects in the bucket.
  3. Click Upload. The Upload Objects pane is displayed.
  4. Drag the files you want to load onto the panel, or click select files to select them from your local files.

3. Document AI

The steps to use Document AI features in Vision.

Complete 2. Load Data to Object Storage before trying this section.

Open Vision Console

  1. From the Console navigation menu, click Analytics & AI.
  2. Under AI Services, click Vision. The Vision home page is displayed.

Use Document AI

  1. Under Vision, click Document AI. The Document AI page is displayed.
  2. Under Image source, click Object storage.
  3. Select a document that you loaded in 2. Load Data to Object Storage. The analyzeDocument API is invoked.
These features are invoked and their results displayed in the Console:
Results of Document AI
Feature Description Results
OCR (Optical Character Recognition) Finds and digitizes text information from images. Text identified in the document is displayed under Raw Text in the Results pane.
Document Image Classification Classifies documents into different types based on their visual appearance, high-level features, and extracted keywords. The classification into a Document type along with a confidence score, is displayed in the Results pane.
Language Classification Classifies the language of document based on visual features. The classification into a Document language along with a confidence score, is displayed in the Results pane.
Table extraction Extracts content in a tabular format, maintaining the row and column relationships of the cells. In the Results pane, click the Table tab to see the output.
Searchable PDF output Embeds a transparent layer on top of document image in PDF format to make it searchable by keywords.

Note: This functionality is only available when a PDF document is provided.

Click Searchable PDF. An OCR PDF file is downloaded to your computer.

4. Image Analysis

The steps to use Image Analysis features in Vision.

Complete 2. Load Data to Object Storage before trying this section.

Open Vision Console

  1. From the Console navigation menu, click Analytics & AI.
  2. Under AI Services, click Vision. The Vision home page is displayed.

Use Image Classification

  1. Under Vision, click Image Classification. The Image Classification page is displayed.
  2. Click Object storage.
  3. Select an image that you loaded in 2. Load Data to Object Storage. The analyzeIamge API is invoked.

The results categorizing objects in the image, are displayed in the Results section. There are labels to classify the detected objects, and a confidence score for each object.

Use Object Detection

  1. Under Vision, click Object Detection. The Object Detection page is displayed.
  2. Click Object storage.
  3. Select an image that you loaded in 2. Load Data to Object Storage. The analyzeIamge API is invoked.

The results are displayed in the Results section. The objects detected, a confidence score for each object, and highlighted bounding box around each object are displayed in the Results pane. If you click a label, where on the image that object is detected is shown.

What's Next

Now you know how to use Vision with pretrained models, try using it with custom models.