Classification

Block Category: DNN

Input Image Format

Input Image Requirements: None

Outputs:

      Class Name / ID: Outputs either the class name or numeric index value of the image. Class names are obtained from the classes file specified in the Classification dialog. If no classes file is specified, a numeric index value is output, which is obtained from the model file specified in the Classification dialog.

      %Accuracy: Outputs the confidence level that the image has been classified correctly.

      Inference Time (ms): Outputs the time for one inference.

Description: The Classification block uses a pre-trained neural network to detect and classify an input image.

 

Model and Configuration

Config File: Specifies the network configuration file that contains all the parameters on which the model was trained. The following types of configuration files are available:

      Caffe (PROTOTXT)

      Darknet (CFG)

      DLDT (XML)

      TensorFlow (PBTXT)

The configuration file type must match the file type specified in Model File. For example, if you specify a Caffe model file, you must select a Caffe configuration file.

Some model files do not have corresponding configuration files. In this case, the parameter is grayed out.

To locate and load a configuration file, click … .

Model File: Specifies a pre-trained neural network model file with weights. The following types of model files are available:

      Caffe (CAFFEMODEL)

      Darknet (WEIGHTS)

      DLDT (BIN)

      ONNX (ONNX)

      TensorFlow (PB)

      Torch (T7 or NET)

To locate and load a model file, click .

Blob Input Parameters

Crop Input to Model: Indicates whether the image will be cropped after it has been resized. Images are cropped from the center to maintain aspect ratio.

meanR, meanG, meanB: Subtracts the specified value from every RGB pixel value. The default is 1.

RGB Scale Factor: Scales the pixel RGB values of the input image.

Swap R and B Channels: Swaps the first and third channel in a 3-channel image.

Width x Height: Resizes the image to the specified width and height pixel values.

Classes

Classes File: Indicates an optional file that contains the class names to which the trained neural network will classify the given image input. The class names are listed in the List of Classes window. If you do not specify a classes file, the class identified is not be displayed, however, a confidence level is displayed.

Class Name: Specifies a class to search for in the classes file. Click Search to execute the search.

List of Classes: Lists all class names in the specified class file. To search for a specific class name, enter it in the Class Name parameter and click Search.