mxpi_objectselector

Function

Filters the postprocessing results based on the area size, area bound, and confidence threshold during multi-level inference.

Constraints

Receives the bounding box data output by the postprocessing plugin mxpi_objectportprocessors.

Plugin Base Class (Factory)

mxpi_objectselector

Input/Output

  • Input: metadata (data type: MxpiObjectList)
  • Output: metadata (data type: MxpiObjectList)

Port Format (Caps)

  • Static input: {"metadata/object"}
  • Static output: {"metadata/object"}

Property

For details, see Table 1.

  • All the parameter values cannot be left empty. If all the values are set to 0, filtering is not performed by default.
  • The bounding box must meet the following requirements: MinArea < bounding box < MaxArea.
  • The filtering sequence is as follows: Filter bounding boxes based on upper and lower bounds and confidence, and then select the maximum or minimum N bounding boxes from the remaining ones. The maximum or minimum bounding boxes cannot be selected at the same time.
Table 1 mxpi_objectselector plugin properties

Property Name

Description

Mandatory or Not

Modifiable or Not

dataSource

Index of the input data (generally the name of the upstream element). Multiple indexes can be configured and separated by commas (,). The default value is the metadata key of the output port corresponding to the upstream plugin.

No

Yes

FirstDetectionFilter

Sets the condition for selecting the bounding box in the map format. The meaning of the fields is as follows:
  • Type: Currently, only Area is supported.
  • TopN: maximum N bounding boxes. If the value is set to 0, the selection is disabled.
  • BottomN: minimum N bounding boxes. If the value is set to 0, the selection is disabled.
  • MinArea: lower limit of the bounding box. If the value is set to 0, the selection is disabled.
  • MaxArea: upper limit of the bounding box. If the value is set to 0, the selection is disabled.
  • ConfThresh: If the confidence threshold of the bounding box is greater than the configured threshold, the bounding box is reserved. The default value is 0.

Yes

Yes