Monday, June 24, 2024

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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.

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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.

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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.

OCI AI Vision Facial Detection in Oracle Analytics Cloud

OCI AI Vision Facial Detection in Oracle Analytics Cloud

Build the Dataflow.

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

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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).

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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.

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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.

OCI AI Vision Facial Detection in Oracle Analytics Cloud

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.

OCI AI Vision Facial Detection in Oracle Analytics Cloud

Source: oracle.com

Related Posts

0 comments:

Post a Comment