HomeDocumentation
Log In

Brain Builder for AITRIOS

Using Brain Builder for AITRIOS is similar to using Neurala's standard Brain Builder product. The following documentation will be helpful in understanding how to use Brain Builder for AITRIOS.

Brain Builder versions

There are different versions of Brain Builder for AITRIOS with different features and functionality:

  • The Full version of Brain Builder includes the ability to train all available model types detailed in this documentation.
  • The Lite version of Brain Builder only allows training of Classifier models.

πŸ”

Brain Builder licensing

The ability to train different Brain types depends on the Brain Builder for AITRIOS license. If you do not see the type of Brain you would like to use in Brain Builder, please contact AITRIOS support for assistance.

↗️ Exporting Brains for AITRIOS

The following model types can be exported from Brain Builder for use with AITRIOS:

  • Static Classifier
  • Anomaly Hi-Fi
  • Detector

Though Learning Classifiers and Anomaly Recognizers are trained in Brain Builder as part of the process, they are not exportable.

Export process

  1. After the Brain has been trained to your satisfaction, navigate to the Export page within Brain Builder and click the Download Brain button.
  2. This will generate a zip file that includes the trained Brain and other key files that are necessary to use the Brain within the AITRIOS platform.

Detailed instructions for the AITRIOS platform are available on the Sony AITRIOS Developer Site.

.

πŸ“‚ Export File Information

Each exported Brain comes packaged with multiple files. The most important of these is the README.md file that includes detailed information about the contents of the exported zip file.

It may be helpful to understand the PPL Parameter and Command Parameter settings to fully leverage the Neurala Brain within AITRIOS. These are documented on the AITRIOS developer site:

The files and data packaged with the Neurala Brain can be used to adjust these parameters, as follows:

Anomaly Hi-Fi

The flatbuffer schema for the Neurala Anomaly Hi-Fi Vision and Sensing WASM application is:

// version 1.0.0

namespace NeuralaRecognizer;

table HifiResults {
    width:uint;
    height:uint;
    anomalyScore:float;
    heatmap:[float];
}

root_type HifiResults;
  • width: Width of the heatmap
  • height: Height of the heatmap
  • heatmap: Matrix of floating point values. Each value is a floating point in the range [0.0 - 1.0], where 0 means the area is normal, and non zero refers to the degree of anomaly. Each value in the heatmap corresponds to the anomaly score inside the image Region of interest. The region of interest is divided into a grid of size width x height and each value maps cells of that grid starting from top-left for the first value of the heatmap to the bottom right cell for the last value of the heatmap, going from left to right line by line.
  • anomalyScore: Anomaly level for the whole image, between [0.0 - 1.0], where 0.0 is Normal and 1.0 is completely anomalous. Each value in the heatmap has its own score, and they are averaged together to create the anomalyScore.

You may use this application in conjunction with flatbuffer compiler flatc to generate bindings for your programming language.

PPL Parameters:

PPL Parameters are generated by BrainBuilder for your Brain during the Export phase. They can be updated as needed. You should be able to find the PPL Parameter JSON file in your brain zip file along with the corresponding WASM application.

Anomaly Hifi models have two PPL parameters:

  • pixelThreshold: Controls when a heatmap element is declared anomalous. If the element value is above threshold, it is an anomalous, ortherwise it is considered normal and set to 0.0.
  • imageThreshold: Controls when an image is declared anomalous. If anomaly score is above image threshold, the image is an anomaly, otherwise it is considered normal.

Deserialization

For sample code to deserialize the Anomaly Hi-Fi model output obtained from AITRIOS, see Neurala Tools for Sony AITRIOS.

Detector

PPL Parameters

  • dnn_output_detections: Set to the same value as detection_classes -> channels in the deploy.json file that is exported with the Detection Brain.
  • max_detections : Thissets the upper limit to the number of detected Bounding boxes you want to get when the Detector runs. The value should be greater than 0 and less than or equal to the value of dnn_output_detections.
  • threshold: This represents a "sensitivity" value. Lower thresholds will allow more bounding box predictions to occur, while higher thresholds will result in fewer predictions.
  • input_width: Set to the value shown in the deploy.json file that is exported with the Detection Brain.
  • input_height: Set to the value shown in the deploy.json file that is exported with the Detection Brain.

Static Classifier

PPL Parameters

  • dnn_output_classes: Set to the number of classes on which the Brain has been trained.
  • max_predictions : Setto the maximum number of predictions you want to receive from the Static Classifier. The value should be greater than 0 and less than or equal to the value of dnn_output_classes. Neurala recommends a value of 1 so that the classifier returns one prediction per image.

Additional Model Details

Input Tensor

Input Tensor

Brain Builder automatically resizes images to fit the "input tensor" (or input resolution) of each model. This is not something that the user needs to do. The input resolutions for each model type are:

  • Static Classifier: 224x224, 256x256 (The optimal resolution is determined automatically by Brain Builder when the model is built.)
  • Anomaly Hi-Fi: 256x256
  • Detector: 320x320