Object Detection

1.0 Introduction

This article describes the steps to run an object detection model using the Yolov5 algorithm in Fortanix Confidential AI.

2.0 Prerequisites

  • An image for object detection. Images can be in the following formats: bmp, jpg, jpeg, png, tif, tiff, dng.
  • A user signed in to a Confidential AI account.

For instructions to sign up and log in, refer to our User’s guide: Sign up for Confidential AI.

3.0 Logging In

Log in to Fortanix Data Security Manager and navigate to the Confidential Computing user interface by clicking the Go to Confidential AI button.


Figure 1: Log In Page

For more details on how to sign up and log in to Fortanix Confidential AI, refer to User's Guide: Sign Up and Log In - New Users.

4.0 Data Ingestion

By default, the Data Ingestion page is displayed.

Perform the following steps to upload the data on the Confidential AI platform:

  1. On the Data Ingestion page, click the CREATE DATASET button, and select the Image Dataset option.
    Figure 2: Create Dataset
  2. In the CREATE DATASET form, enter the following details:
    • Dataset Name: Enter the name of the dataset. For example, Object_detection.
    • Description: Enter the details of the dataset.
    • File Type:
      • Upload a File: Select the Upload a file option to upload your data directly to the Fortanix Confidential AI platform.
        Figure 3: Upload File Details
      • S3 URL: Select the S3 URL to bring your data by connecting to an S3 account.
        • S3 Bucket URL: Enter the URL of the image in the S3 bucket.
        • Access Key ID: Enter the Access Key ID for Confidential AI to be able to access the data on your S3 bucket.
        • Secret Key: Enter the Secret Key for Confidential AI to be able to access the data on your S3 bucket.
        • Encryption Key: Enter the encryption key that was used to encrypt the file on your S3 bucket (User’s Guide: Prepare your S3 Bucket).
          For more details on how to prepare your S3 bucket for Confidential AI, refer to the User's Guide: Preparing Your S3 Bucket for Confidential AI.
          Figure 4: S3 URL Details
    • Labels:
      • Add Labels: To track what the data is used for; you can optionally add Labels in the form of “Key:Value” pairs.
  3. Click the CREATE DATASET button to save the data.

    For a more detailed guide about the Confidential AI data ingestion process, refer to the User's Guide: Data Ingestion.

    Figure 5: Dataset Successfully Created

5.0 Data Inference

The object detection model is used on your image and it outputs by drawing bounding boxes on the objects in your image.

Perform the following steps:

  1. In the INFERENCE tab, click the BUILD INFERENCE option to predict the data output.
    Figure 6: Build Inference
  2. In the Inference form, enter the following details:
    • Inference flow name: Enter the name of the inference flow.
    • Select Model:
      • Model: Select the trained model as FORTANIX.
      • Select a model: Select the object detection (Yolov5) model from the drop down menu.
    • Select input dataset: Select the input dataset you created. The input dataset list will be filtered by the input file format of the selected model.
    • Output Configuration:
      • Output name: Enter a name for the output dataset that will contain the predicted output.
      • Encrypt Dataset: This option is selected by default to generate an encryption key and add an extra layer of protection to the output data. You can copy or download the key to decrypt the output data for viewing.
        Figure 7: Inference Dialog Box
  3. Click the CREATE INFERENCE FLOW to pass the data through Yolov5 algorithm and predict the output.
  4. After the inference is successfully created, click the RUN button below the inference workflow to run the model and predict the output.
    Figure 8: Run Button

6.0 Run Inference

When the model was executed successfully, the status of the execution is shown under the Execution Log.

  1. Click the Execution Log link to view the log details.
    Figure 9: Inference Successfully Created
  2. After the execution is completed successfully, the output is now predicted and ready to be viewed. To view the output, click the DOWNLOAD button.
    Figure 10: Download the Output
  3. In the DOWNLOAD dialog box, enter the decryption key to decrypt the output.
  4. A *.tar file is generated on your local machine. Extract the contents of the file to view the Churn predictions from the model.
    The following is an example of the input image before object detection:
    FigureFigure 11: Before Object Detection figure12.png Figure 12: After Object Detection


Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful