OCI AI Vision Facial Detection in Oracle Analytics Cloud

June 4, 2024 | 6 minute read
Text Size 100%:

This post explores the OCI service AI Vision Facial Detection exposed directly in Oracle Analytics. With prebuilt models available, developers can easily build image recognition and text recognition into their applications without machine learning (ML) expertise.  This post will walk users through registering their AI Vision Face Detection model, uploading images, running their dataflow, and analyzing the output. 

Users can analyze single images or a batch of images directly in OAC using the pre-trained face detection model. OCI AI Vision Facial Detection feature provides the following information:

  1.     Identifies the existence of faces in each image.
  2.     The location of faces in each image using bounding box coordinates.
  3.     Facial landmarks for each detected face, including left eye, right eye, nose tip, and left and right edges of mouth.
  4.     Visual quality of each face: a higher score indicates that the image of the face is more likely to be suitable for biometrics.

Register your OCI AI Vision Face Detection Model

  • In the OCI AI Vision service, register your Face Detection Model.

register model

  • Select the connection to your OCI tenancy.
  • Choose the desired compartment.
  • Select the face detection model and provide a staging bucket.

model register

Uploading and preparing your image files

To start, first upload images to an OCI bucket.  Once all images reside in a OCI bucket, there are two options to build the required data input file that will be used in your data flow.

  1. The first option is to create a CSV/xls file that points directly to all the images you wish to use with the face detection model (see left side of screenshot).
  2. The second option option is to create a CSV/xls that points to the root of the bucket where all images reside.  In this scenario, the model will consume all images within the bucket (see right side of screenshot).
  3. Once the input data file is created, you can proceed directly to OAC to build your dataflow and run the face detection model.

data file

Executing the Face Detection model

Dataset Prep

  1. To this point, the following steps have been completed: registering the face detection model, uploading images to an OCI bucket, and creating an input data file.
  2. With all these components in place, it's time to build the dataflow and execute the model. First, you need to upload the input data file created in the previous step.
  3. Follow the screenshot flow below to upload and save the data file in OAC.  This example shows an input file that points directly to each individual image file.  Once the data file is saved, you can build your dataflow.



Build the Dataflow.

3. To build the dataflow, start with your newly created input dataset and add the AI Face Detection model.


4. With the model added to the data flow, you'll see all the output columns that will be produced by the Face Detection Model.

  • In the parameters sections, choose the input column (the source column of your images within your data file).
  • For the input type selection, specify from the dropdown to indicate whether your input dataset uses images or images sourced directly from a bucket.


5. The last step is to save the model output in a data file.

  • Add a step to your dataflow, 'save data'.
  • Once you provided a dataset name, click run, and provide a dataflow name.
  • As part of the save data process, you'll see an output preview of the Face Detection model. Note that depending on the number of images in your model, execution times will vary (currently OAC supports up to 250 face detections per image).


Visualize in OAC

With the data flow successfully executed, you can now create a new workbook in OAC and visualize the output. Before starting, you need to first download the vision series plugin from the OAC library and upload it into your OAC deployment, as this is the visualization type you'll use with the Face Detection Model.


Build your OAC Workbook

  1. Start by adding your model output dataset to the workbook and selecting the Vision Plugin.
  2. Then, using facial landmarks, you can now identify the exact coordinates and features of each within your images.
  3. In addition, the model provides a quality and confidence score.
  4. In this sample, the use of dashboard filters allows for a quick review of all images that were put through the model.


AI Explain

In addition, through the use of AI Explain, you can gain valuable insights into the model where all images are analyzed and reported on together.



Oracle Face Detection is part of the OCI Vision service and is available today within your OCI tenancy. Follow this blog to understand how to register your model and explore the capabilities and functionality of Oracle AI Face Detection.  Watch the full video on YouTube here to see an end-to-end implementation of this exciting new feature .

Pete Monteiro

Previous Post

Building Models with OML4R and Deploying them in Oracle Analytics Cloud

Ravi Bhuma | 6 min read

Next Post

Use Custom Hostnames for Oracle Fusion Analytics

Dayne Carley | 7 min read