mxpi_textobjectpostprocessor

Function

Inherits the image postprocessing base class, which is used to postprocess the output tensor of the detection model inference of the text object bounding box.

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 TextObjectInfo data type.

Plugin Base Class (Factory)

mxpi_textobjectpostprocessor

Input/Output

Input: buffer (data type: MxpiBuffer) and metadata (data type: MxpiTensorPackageList)

Output: buffer (data type: MxpiBuffer) and metadata (data type: MxpiTextObjectList)

Port Format (Caps)

Static input: {"metadata/tensor"}

Static output: {"metadata/textobject"}

Property

For details, see Table 1.

Sample pipeline of the Python postprocessing plugin:

"mxpi_textobjectpostprocessor0": {
	"props": {
		"dataSource": "mxpi_tensorinfer0",
                "funcLanguage":"python",
		"postProcessConfigPath": "../models/ctpn_ms_cv/ctpn_mindspore.cfg",
		"postProcessLibPath": "../../../python",
		"labelPath": "../models/ctpn_ms_cv/ctpn.names",
                "className":"CtpnPostProcess",
                "pythonModule":"postprocess.post"
	},
	"factory": "mxpi_textobjectpostprocessor",
	"next": "mxpi_dataserialize0"
},

Sample pipeline of the C++ postprocessing plugin:

"mxpi_textobjectpostprocessor0": {
	"props": {
		"dataSource": "mxpi_tensorinfer0",
                "funcLanguage":"c++",
		"postProcessConfigPath": "../models/ctpn_ms_cv/ctpn_mindspore.cfg",
		"postProcessLibPath": "../../../lib/modelpostprocessors/libctpnpostprocess.so",
		"labelPath": "../models/ctpn_ms_cv/ctpn.names"
	},
	"factory": "mxpi_textobjectpostprocessor",
	"next": "mxpi_dataserialize0"
},