mxpi_classpostprocessor
Function |
Inherits the model postprocessing base class, which is used to postprocess the output tensor of the classification model inference. |
|---|---|
Constraints |
Currently, the upstream of the plugin can only be connected to the mxpi_tensorinfer inference plugin, and only MxpiTensorPackageList can be used as the metadata input. This plugin calls the object detection base class Process API of the mxBase repository to communicate and receive the return value of the ClassInfo data type. |
Plugin Base Class (Factory) |
mxpi_classpostprocessor |
Input/Output |
Input: buffer (data type: MxpiBuffer) and metadata (data type: MxpiTensorPackageList) Output: buffer (data type: MxpiBuffer) and metadata (data type: MxpiClassList) |
Port Format (Caps) |
Static input: {"metadata/tensor"} Static output: {"metadata/class"} |
Property |
For details, see Table 1. |
Sample pipeline of the Python postprocessing plugin:
"mxpi_classpostprocessor0": {
"props": {
"funcLanguage":"python",
"postProcessConfigPath": "../models/resnet50/resnet50_aipp_tf.cfg",
"labelPath": "../models/resnet50/resnet50_clsidx_to_labels.names",
"postProcessLibPath": "../../../python",
"className":"Resnet50PostProcess",
"pythonModule":"postprocess.post"
},
"factory": "mxpi_classpostprocessor",
"next": "mxpi_dataserialize0"
},
Sample pipeline of the C++ postprocessing plugin:
"mxpi_classpostprocessor0": {
"props": {
"dataSource": "mxpi_tensorinfer0",
"funcLanguage":"c++",
"postProcessConfigPath": "../models/resnet50/resnet50_aipp_tf.cfg",
"labelPath": "../models/resnet50/resnet50_clsidx_to_labels.names",
"postProcessLibPath": "../../../lib/modelpostprocessors/libresnet50postprocess.so"
},
"factory": "mxpi_classpostprocessor",
"next": "mxpi_dataserialize0"
},