OCI Document Understanding is an OCI AI service that enables developers to extract text, tables, and other key data from document files through APIs and command-line interface tools. With OCI Document Understanding, you can automate tedious business processing tasks with prebuilt AI models and customize document extraction to fit your industry-specific needs.
You can use pre-trained models for text extraction, table extraction, key value extraction, and document classification. Once you choose a pre-trained model, you can upload your images, then register the model in Oracle Analytics Cloud (OAC), and apply your model in a data flow to extract the key values from a resume, a passport, a receipt, or an invoice.
Here's how you can create a data visualization project based on OCI Document Understanding in 4 steps under 5 minutes. The steps are to:
Upload sample passport images to Oracle Cloud, into a private (non-public) bucket object storage.
Register the OCI Document Understanding model in Oracle Analytics Cloud.
Create a data flow to apply the AI model to example passport images.
Add the recognized key values to a Dataset and use this dataset in a workbook to visualize the data.
A prerequisite is to have an Oracle Analytics Cloud instance with a connection to OCI.
Click the menu option, then Storage, create a Bucket, and set a name.
Upload into the bucket all the document images needed to train and test your model.
Ensure the bucket is in the same tenancy as OAC. In this example, the bucket is “Bucket-vision-ai” that was previously created, and I uploaded 9 sample passport pictures under a folder named AID.
This step generates a location where OAC will be able to access uploaded images and apply the AI model.
Step 2 – Register your model in Oracle Analytics Cloud
On the OAC Home Page, click the 3 little dots menu ("...", or the ellipsis) at the top right corner.
Select “Register Model/Function” and select “OCI Document Understanding Models”.
Once selected, choose your OCI connection. If it does not exist, you will need to create a new connection in OAC (Create > Connection > OCI Resource).
The window “Select a Model” will pop up. Select the model type “Pretrained Document Key Value Extraction”.
In the right-side panel, select your OCI Bucket and select the document type. In this example, it's “Passport”.
Step 3 – Apply the AI model to your images
Create a new data flow in OAC.
Create a dataset using a CSV file including your Bucket URL.
Add the Dataset to the data flow.
Add a step “Apply AI Model” to apply your pre-trained AI model to the images. Select the bucket URL in the Parameters, or File Location if you use a dataset showing images as a line item.
Select “Documents” as Input Type if you use itemized images or “Buckets” if you use your bucket URL.
Add a step to save the data in a new dataset. The saved data should contain the image name and URLs as well as the key values text/number extracted.
The data flow will load the images, analyze them with the pre-trained AI model, and extract the key values from the images. In this example, the passport documents. Then the data flow will load all the information into a dataset that you can use to explore and visualize the data.
Step 4 – Visualize the results in Oracle Analytics.
Create a new Workbook in OAC.
Add the new dataset generated by the data flow.
Add an Image plugin visualization object to see all the images in your bucket.
Use this Image object as a filter by clicking the top left corner filter icon.
Create a new table to show all columns of your dataset.
Click one of the passport images to see the key value extracted in the table.
You can now use this workbook as a starting point to create additional calculation metrics to filter and analyze your documents. In this example, I decided to analyze the expiry date and create a conditional formatting donut to show if it’s expired (Red) or passed (Green).
Customers are using OCI Document Understanding to recognize multiple types of documents at scale, from passports to invoices to receipts and resumes. Oracle Analytics allows you to apply and visualize the data in a matter of minutes, helping you go quickly from data to insights, actions, and decisions.
Data Visualization Tips
If you have issues seeing your images and the objects detected, enter this URL in a Google Chrome browser: chrome://flags/#block-insecure-private-network-requests.