Model Post-processing Description
Model post-processing is a matching operation corresponding to the model. In SDK, the main task is to process the inference result tensor transferred by the model inference plugin. For example, in an object detection job, deduplication, sorting, and filtering need to be performed on bounding boxes. Finally, the processing result is written into the metadata of the inference plugin. Currently, post-processing has been developed for all models supported by the SDK, as shown in the following table. If the existing post-processing is incompatible with your model, you need to develop post-processing by yourself. For details, see the following content.
Supported Model |
Post-processing Class Name |
Post-processing Dynamic Library Used by the Inference Plugin |
|---|---|---|
YOLOv3 |
Yolov3PostProcessor |
libMpYOLOv3PostProcessor.so |
YOLOv3-tiny |
||
ResNet-50 |
Resnet50PostProcessor |
libresnet50postprocessor.so |
Faster R-CNN |
FasterRcnnPostProcessor |
libfasterrcnnpostprocessor.so |
SSD-VGG16 |
SsdvggPostProcessor |
libssdvggpostprocessor.so |
SSD MobileNet v1 FPN |
SsdmobilenetfpnPostProcessor |
libssdmobilenetfpnpostprocessor.so |
CRNN |
CrnnPostProcessor |
libcrnnpostprocessor.so |
Generally, postprocessing requires a configuration file and a label file.
- In a label file, you only need to enter the names of all classes line by line in the sequence of class IDs (lines starting with # are not read), as shown in the following:
# This is modified from https://gist.github.com/yrevar/942d3a0ac09ec9e5eb3a unknown type tench, Tinca tinca goldfish, Carassius auratus great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias tiger shark, Galeocerdo cuvieri ......
- The configuration parameters required by each model are different. You can define and add configuration parameters as required. In the post-processing base class, CHECK_MODEL has been read.
- If the value is set to true, model output tensor shapes are verified and models with incompatible post-processing are intercepted.
- If the value is set to false, model verification is skipped.
For details about the model output tensor shapes supported by the SDK and parameters in the configuration file, see Existing Supported Models.