Detection Result Filter

Description

This operator filters a list of detection instances based on specified geometric features (such as area, aspect ratio, or mask area), retaining results that meet the criteria and removing abnormal or non-conforming targets. It supports interval filtering, statistical outlier detection (MAD, standard deviation, quartile), and actual-value comparison, offering flexible quality screening for diverse industrial scenarios.

Overview

Filters detection instances by a selected geometric feature and comparison method, supporting specification ranges, statistical outliers, and target-value deviations.

Scenarios

  • Removing targets with too small (noise) or too large (false background detection) area from segmentation or detection results

  • Filtering abnormally shaped bounding boxes by aspect ratio, such as eliminating overly elongated false detections

  • Automatically identifying and removing outliers using statistical methods (MAD/std/quartile) when a batch of results contains a few anomalous instances

  • Comparing detected features against known target dimensions to filter results that deviate beyond tolerance

Inputs and Outputs

Inputs

Detection Results: A list of DetectInstance detection results containing each target’s polygon contour, minimum area bounding rectangle, confidence score, and class information. Must be connected.

Image (Optional): An RGB 3-channel color image. It must be connected when the node is enabled and detection results are not empty; it may be left unconnected when the node is disabled or detection results are empty.

Outputs

Detection Results: The filtered list of detection instances containing only results that passed the filter criteria. If the node is disabled or the input is empty, the output is identical to the input.

Parameters

Enable Node

Description

Master switch for filtering.

Tuning Instructions

Enable to apply the selected filter. Disable to skip image validation and all calculations and pass detection results through unchanged.

Parameter Range

Default: True

Filter Strategy

Description

Determines which geometric feature is calculated for each instance; the resulting values are evaluated by the comparison method.

Tuning Instructions

  • Minimum Bounding Rectangle Area: width × height in px².

  • Minimum Bounding Rectangle Aspect Ratio: long side ÷ short side; returns 0 when the short side is 0.

  • Mask Area Ratio: polygon area ÷ full image area.

  • Mask Area Size: polygon contour area in px².

  • Minimum Bounding Rectangle Long Edge: the larger of width and height, in px.

  • Minimum Bounding Rectangle Short Edge: the smaller of width and height, in px.

Parameter Range

Options: Minimum Bounding Rectangle Area, Minimum Bounding Rectangle Aspect Ratio, Mask Area Ratio, Mask Area Size, Minimum Bounding Rectangle Long Edge, Minimum Bounding Rectangle Short Edge, Default: Minimum Bounding Rectangle Area

Parameter Range

Values/Range:

  • Minimum Bounding Rectangle Area

  • Minimum Bounding Rectangle Aspect Ratio

  • Mask Area Ratio

  • Mask Area Size

  • Minimum Bounding Rectangle Long Edge

  • Minimum Bounding Rectangle Short Edge

Default: Minimum Bounding Rectangle Area

Comparison Method

Description

Selects how instances are retained or removed using minimum bounding rectangle area (px²).

Tuning Instructions

Use Value range for explicit limits; Median absolute deviation, Standard deviation, or Quartile for batch-distribution outliers; use Actual-value difference for a known target.

Parameter Range

Options: Value range, Median absolute deviation, Standard deviation, Quartile, Actual-value difference, Default: Value range

Parameter Range

Values/Range:

  • Value range

  • Median absolute deviation

  • Standard deviation

  • Quartile

  • Actual-value difference

Default: Value range

Minimum Value

Description

Lower retention limit for minimum bounding rectangle area (px²).

Tuning Instructions

Used only with Value range. Instances below it are removed. Keep it no greater than Maximum Value; raising it removes more low-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000000]

Maximum Value

Description

Upper retention limit for minimum bounding rectangle area (px²).

Tuning Instructions

Used only with Value range. Instances above it are removed. Keep it no less than Minimum Value; lowering it removes more high-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000000]

Actual Value

Description

Target value for minimum bounding rectangle area (px²).

Tuning Instructions

Used only with Actual-value difference. Set it from valid samples or specifications. Filter Threshold controls the allowed relative deviation; the fixed 0.00001 denominator adjustment matters more as the target approaches 0.

Parameter Range

[0, 100000000], Default: 3.0

Parameter Range

Values/Range: [0, 100000000]

Default: 3.0

Comparison Method

Description

Selects how instances are retained or removed using minimum bounding rectangle aspect ratio (long side ÷ short side).

Tuning Instructions

Use Value range for explicit limits; Median absolute deviation, Standard deviation, or Quartile for batch-distribution outliers; use Actual-value difference for a known target.

Parameter Range

Options: Value range, Median absolute deviation, Standard deviation, Quartile, Actual-value difference, Default: Value range

Parameter Range

Values/Range:

  • Value range

  • Median absolute deviation

  • Standard deviation

  • Quartile

  • Actual-value difference

Default: Value range

Minimum Value

Description

Lower retention limit for minimum bounding rectangle aspect ratio (long side ÷ short side).

Tuning Instructions

Used only with Value range. Instances below it are removed. Keep it no greater than Maximum Value; raising it removes more low-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 1000]

Maximum Value

Description

Upper retention limit for minimum bounding rectangle aspect ratio (long side ÷ short side).

Tuning Instructions

Used only with Value range. Instances above it are removed. Keep it no less than Minimum Value; lowering it removes more high-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 1000]

Actual Value

Description

Target value for minimum bounding rectangle aspect ratio (long side ÷ short side).

Tuning Instructions

Used only with Actual-value difference. Set it from valid samples or specifications. Filter Threshold controls the allowed relative deviation; the fixed 0.00001 denominator adjustment matters more as the target approaches 0.

Parameter Range

[0, 1000], Default: 3.0

Parameter Range

Values/Range: [0, 1000]

Default: 3.0

Comparison Method

Description

Selects how instances are retained or removed using mask area divided by full image area.

Tuning Instructions

Use Value range for explicit limits; Median absolute deviation, Standard deviation, or Quartile for batch-distribution outliers; use Actual-value difference for a known target.

Parameter Range

Options: Value range, Median absolute deviation, Standard deviation, Quartile, Actual-value difference, Default: Value range

Parameter Range

Values/Range:

  • Value range

  • Median absolute deviation

  • Standard deviation

  • Quartile

  • Actual-value difference

Default: Value range

Minimum Value

Description

Lower retention limit for mask area divided by full image area.

Tuning Instructions

Used only with Value range. Instances below it are removed. Keep it no greater than Maximum Value; raising it removes more low-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 1]

Maximum Value

Description

Upper retention limit for mask area divided by full image area.

Tuning Instructions

Used only with Value range. Instances above it are removed. Keep it no less than Minimum Value; lowering it removes more high-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 1]

Actual Value

Description

Target value for mask area divided by full image area.

Tuning Instructions

Used only with Actual-value difference. Set it from valid samples or specifications. Filter Threshold controls the allowed relative deviation; the fixed 0.00001 denominator adjustment matters more as the target approaches 0.

Parameter Range

[0, 1], Default: 3.0

Parameter Range

Values/Range: [0, 1]

Default: 3.0

Comparison Method

Description

Selects how instances are retained or removed using mask contour area (px²).

Tuning Instructions

Use Value range for explicit limits; Median absolute deviation, Standard deviation, or Quartile for batch-distribution outliers; use Actual-value difference for a known target.

Parameter Range

Options: Value range, Median absolute deviation, Standard deviation, Quartile, Actual-value difference, Default: Value range

Parameter Range

Values/Range:

  • Value range

  • Median absolute deviation

  • Standard deviation

  • Quartile

  • Actual-value difference

Default: Value range

Minimum Value

Description

Lower retention limit for mask contour area (px²).

Tuning Instructions

Used only with Value range. Instances below it are removed. Keep it no greater than Maximum Value; raising it removes more low-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000000]

Maximum Value

Description

Upper retention limit for mask contour area (px²).

Tuning Instructions

Used only with Value range. Instances above it are removed. Keep it no less than Minimum Value; lowering it removes more high-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000000]

Actual Value

Description

Target value for mask contour area (px²).

Tuning Instructions

Used only with Actual-value difference. Set it from valid samples or specifications. Filter Threshold controls the allowed relative deviation; the fixed 0.00001 denominator adjustment matters more as the target approaches 0.

Parameter Range

[0, 100000000], Default: 3.0

Parameter Range

Values/Range: [0, 100000000]

Default: 3.0

Comparison Method

Description

Selects how instances are retained or removed using minimum bounding rectangle long edge (px).

Tuning Instructions

Use Value range for explicit limits; Median absolute deviation, Standard deviation, or Quartile for batch-distribution outliers; use Actual-value difference for a known target.

Parameter Range

Options: Value range, Median absolute deviation, Standard deviation, Quartile, Actual-value difference, Default: Value range

Parameter Range

Values/Range:

  • Value range

  • Median absolute deviation

  • Standard deviation

  • Quartile

  • Actual-value difference

Default: Value range

Minimum Value

Description

Lower retention limit for minimum bounding rectangle long edge (px).

Tuning Instructions

Used only with Value range. Instances below it are removed. Keep it no greater than Maximum Value; raising it removes more low-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000]

Maximum Value

Description

Upper retention limit for minimum bounding rectangle long edge (px).

Tuning Instructions

Used only with Value range. Instances above it are removed. Keep it no less than Minimum Value; lowering it removes more high-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000]

Actual Value

Description

Target value for minimum bounding rectangle long edge (px).

Tuning Instructions

Used only with Actual-value difference. Set it from valid samples or specifications. Filter Threshold controls the allowed relative deviation; the fixed 0.00001 denominator adjustment matters more as the target approaches 0.

Parameter Range

[0, 100000], Default: 3.0

Parameter Range

Values/Range: [0, 100000]

Default: 3.0

Comparison Method

Description

Selects how instances are retained or removed using minimum bounding rectangle short edge (px).

Tuning Instructions

Use Value range for explicit limits; Median absolute deviation, Standard deviation, or Quartile for batch-distribution outliers; use Actual-value difference for a known target.

Parameter Range

Options: Value range, Median absolute deviation, Standard deviation, Quartile, Actual-value difference, Default: Value range

Parameter Range

Values/Range:

  • Value range

  • Median absolute deviation

  • Standard deviation

  • Quartile

  • Actual-value difference

Default: Value range

Minimum Value

Description

Lower retention limit for minimum bounding rectangle short edge (px).

Tuning Instructions

Used only with Value range. Instances below it are removed. Keep it no greater than Maximum Value; raising it removes more low-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000]

Maximum Value

Description

Upper retention limit for minimum bounding rectangle short edge (px).

Tuning Instructions

Used only with Value range. Instances above it are removed. Keep it no less than Minimum Value; lowering it removes more high-valued instances.

Parameter Range

Parameter Range

Values/Range: [0, 100000]

Actual Value

Description

Target value for minimum bounding rectangle short edge (px).

Tuning Instructions

Used only with Actual-value difference. Set it from valid samples or specifications. Filter Threshold controls the allowed relative deviation; the fixed 0.00001 denominator adjustment matters more as the target approaches 0.

Parameter Range

[0, 100000], Default: 3.0

Parameter Range

Values/Range: [0, 100000]

Default: 3.0

Median Deviation Coefficient

Description

Retention ceiling for the modified Z-score.

Tuning Instructions

Used only with Median absolute deviation. The score is

value − median

÷ (1.4826 × MAD); scores at or below this coefficient are retained. Lower values are stricter. All instances are retained when MAD is 0.

Parameter Range

[1, 4], Default: 3.5

Parameter Range

Values/Range: [1, 4]

Default: 3.5

Standard Deviation Coefficient

Description

Retention ceiling for distance from the mean in standard deviations.

Tuning Instructions

Used only with Standard deviation. Instances are retained when

value − mean

÷ standard deviation is at or below this coefficient. Lower values are stricter. All instances are retained when the standard deviation is 0.

Parameter Range

[1, 4], Default: 3.0

Parameter Range

Values/Range: [1, 4]

Default: 3.0

Quartile Deviation Coefficient

Description

Expansion coefficient for the interquartile range.

Tuning Instructions

Used only with Quartile. The retained interval is Q1 − coefficient × IQR through Q3 + coefficient × IQR. Lower values are stricter.

Parameter Range

[0.5, 3], Default: 1.5

Parameter Range

Values/Range: [0.5, 3]

Default: 1.5

Filter Threshold

Description

Retention ceiling for a detected value’s relative difference from its target.

Tuning Instructions

Used only with Actual-value difference. An instance is retained when

detected − target

÷ (target + 0.00001) is at or below this threshold; lowering it tightens the allowed deviation.

Parameter Range

[0.0, 1.0], Default: 0.3

Parameter Range

Values/Range: [0.0, 1.0]

Default: 0.3