Contents

Multi-Class Classification UDF Overview

Multi-Class Classification UDF accepts the frames and classifies object in the frame into different categories. Additionally, it shows the probability of other classes too with its confidence value. This classification does not need any specialized image preprocessing UDF.

Note

: For successful execution, you can stream a sample video file classification_vid.avi([WORK_DIR]/IEdgeInsights/CustomUdfs/PyMultiClassificationIngestion/classification_vid.avi). For using camera classification will work correctly if the model has been trained for the object earlier. It is currently trained with some subset of imageNet database. The labels for which it is trained already trained can be found in following label file([WORK_DIR]/IEdgeInsights/CustomUdfs/PyMultiClassificationIngestion/sample_classification/ref/squeezenet1.1.labels)

UDF config:

{
    "name": "sample_classification.multi_class_classifier",
    "type": "python",
    "device": "CPU",
    "labels_file_path": "./sample_classification/ref/squeezenet1.1.labels",
    "model_xml": "./sample_classification/ref/squeezenet1.1_FP32.xml",
    "model_bin": "./sample_classification/ref/squeezenet1.1_FP32.bin"
}

NOTE: The above config works for both “CPU” and “GPU” devices after setting appropriate device value.