Using ETL
The Deep Learning module has a dependency on ETL. Ensure the ETL module is available and enabled in Ambience. ETL chainset can be created to utilise the models upload.
Below are some examples on how ETL is used to forecast and predict using the different types of models.
Open Neural Network Exchange (ONNX) is an open format built to represent machine learning models. It allows models to be transferred seamlessly between various deep learning frameworks, such as PyTorch, TensorFlow, and others. ONNX facilitates interoperability and flexibility in model deployment, making it easier to deploy and scale models across different platforms and environments.
ONNX Model
In this example, the “Simple ONNX Test” ETL chainset performs prediction using the input data.
This ETL chainset performs the following:
- First step reads in JSON records
- Second step forecasts using the input data (in array form)
- Third step unwinds the array and displays the forecast result
Run the steps and the ETL chainset performs the prediction.
ONNX Sentiment Model
The forecast sentiment or sentiment analysis allows you to determine whether a piece of string sentence input is positive or negative. The result ranges from 1 being very negative to 10 being very positive.
In this example, the “Sentiment Test” ETL chainset forecasts the sentiment score of the input data, in this case JSON records.
This ETL chainset performs the following:
- First step defines the aggregation
- Second step reads from MongoDB
- Third step replaces all string with the regular expression defined
- Fourth step places all characters into lower case
- Fifth step forecast the sentiment (in array form)
- Sixth step flattens the array and displays the sentiment score
Run the steps and the ETL chainset forecasts the sentiment score.
ONNX YOLO Model
ONNX YOLO model refers to the version of the You Only Look Once (YOLO) object detection model that has been converted to the ONNX format. It provides a flexible efficient solution for real-time object detection tasks while leveraging the benefits of ONNX for broader compatibility and optimized deployment.
It takes bytes of images as input and performs object detection and output into objects of arrays.
In the example below, an “Object Detection YOLO V7” ETL chainset is created to detect objects using the YOLO V7 model uploaded in the Deep Learning module.
This ETL chainset performs the following:
- First step reads in an input picture file placed in the Ambience “data/in/images” folder
- Second step defines the model to be used and the necessary parameters
- Third step unwinds the result array
- Fourth step flattens the document
- Fifth step uploads the output file to Uploads module
Run the steps and view the output file in the Uploads page.
In the Upload Management page, click on the “Copy Link” icon under the “Actions” column to copy the URL of the output file. Open a browser tab and paste the link into the address bar. Hit the “Enter” key and the output file will be displayed. You can also download the output file by clicking on the
“Download” icon under the “Actions” column.
The model is able to detect the different types of objects.
To see the predicted classes, disable the fifth step in the ETL chainset. Run the chainset and see the predicated classes and names in the “Results” panel.