mxpi_objectselector

Function

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

Constraints

Receives the object frame 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.

  1. All the parameter values cannot be left empty. If all the values are set to 0, filtering is not performed by default.
  2. The area of the object frame must meet the following requirements: MinArea < object frame area < MaxArea.
  3. The filtering sequence is as follows: Filter the upper and lower bounds of the area and confidence level of the object frame, and then select the maximum or minimum N object frames from the remaining object frames. The maximum or minimum object frames 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 object frame in the map format. The meaning of the fields is as follows:
  • Type: Currently, only Area is supported.
  • TopN: maximum N object frames. If the value is set to 0, the selection is disabled.
  • BottomN: minimum N object frames. If the value is set to 0, the selection is disabled.
  • MinArea: lower limit of the object frame area. If the value is set to 0, the selection is disabled.
  • MaxArea: upper limit of the object frame area. If the value is set to 0, the selection is disabled.
  • ConfThresh: If the confidence level of the object frame is greater than the threshold, the object frame is reserved. The default value is 0.

Yes

Yes