Introduction
This article describes how to build and test Object Detection using the Yolov5 algorithm in Fortanix Confidential AI.
Prerequisites
- An image for object detection. Image can be in the format:
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.
Building the Model
Data Ingestion
- On the Data Ingestion page, click CREATE DATASET, and select Image Dataset.
Figure 1: Create image dataset
- Dataset name - Enter a name for your dataset.
- Select the Upload a file option if you want to upload your data directly to the Fortanix Confidential AI platform.
- In the File Upload section, upload the image file.
- To track what the data is used for; you can optionally add Labels in the form of “Key:Value” pairs.
- Click CREATE DATASET to save the data.
Figure 2: Create image dataset
The following input image is uploaded in this example.Figure 3: Image dataset
- You will now see the saved dataset in the dataset table.
Data Inference
In this stage, the data is passed through a machine learning model to identify and predict the objects in the image.
- In the INFERENCE tab, click BUILD INFERENCE to predict the data output.
- In the Build Inference form, enter the Inference flow name, that is, the name of the inference model.
- In the Select model section, select FORTANIX, and then select Object detection algorithm from the drop down.
- In the Select input dataset field, select the input dataset you created in the first phase that you want to pass through a machine learning model. The input dataset list will be filtered by the input file format of the model selected in the previous step.
- In the Output Configuration field, enter the name of the output dataset that will contain the predicted output.
- The output dataset will be encrypted; hence Encrypt Dataset is enabled to add an extra layer of protection to the output data. Copy or download the encryption key to decrypt the output data for viewing.
- Click CREATE INFERENCE FLOW to pass the data through a machine learning model and predict the output.
Figure 4: Build inference
- The inference is successfully created. Click RUN below the inference workflow to run the model and predict the output.
Figure 5: Run inference
- If the model was executed successfully, you would see the status of the execution under the Execution Log. Click the Execution Log link to view the log details.
Figure 6: Inference success
- 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 7: Download output
- In the DOWNLOAD dialog box, enter the Encryption key to decrypt the output.
Figure 8: Decrypt output
- A
*.tar.gz
file is generated on your local machine. Extract the contents of the file. The object detected output images appear as shown below.
Figure 9: Output
Comments
Please sign in to leave a comment.