Post-Processing Transform YAML References
  • 21 Dec 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Post-Processing Transform YAML References

  • Dark
    Light
  • PDF

Article summary

The sections in this article are the available post-processing transforms.

BinaryPixelThresholdRule

  • Type: Object
  • Category: Postprocessing
  • Description: Converts a binary segmentation mask to the image-level OK/NG result based on a percentage of pixels greater than the probability threshold.
  • Properties:
    • probability_threshold:
      • Type: Number
      • Default: None
      • Minimum: 0
      • Maximum: 1
    • area_percent_threshold:
      • Type: Number
      • Default: None
      • Minimum: 0
      • Maximum: 1
    • always_apply:
      • Type: Boolean
      • Default: False
    • p:
      • Type: Number
      • Default: 1.0
      • Minimum: 0
      • Maximum: 1

FilterBBoxesDimensions

  • Type: Object
  • Category: Postprocessing
  • Description: Transform that filters boxes of a particular class depending on the dimensions.
  • Properties:
    • defect_map:
      • Type: String
    • height_threshold:
      • Type: Integer
      • Default: None
      • Minimum: 0
    • width_threshold:
      • Type: Integer
      • Default: None
      • Minimum: 0
    • to_ignore:
      • Type: Array
      • Items:
        • Type: String
    • filter_slim:
      • Type: Boolean
      • Default: True
    • filter_short:
      • Type: Boolean
      • Default: True
    • always_apply:
      • Type: Boolean
      • Default: False
    • p:
      • Type: Number
      • Default: 1.0
      • Minimum: 0
      • Maximum: 1

FilterMaskDimensions

  • Type: Object
  • Category: Postprocessing
  • Description: Zeroes out mask values above 0 whose area is below a certain threshold. The threshold can be applied per category.
  • Properties:
    • area_percent_threshold:
      • anyOf:
        • Type: Number
        • Default: 0.0
        • Minimum: 0
        • Maximum: 1
      • Type: Array
        • MinItems: 1
        • Default: [0.0]
        • Items:
          • Type: Number
          • Minimum: 0
    • always_apply:
      • Type: Boolean
      • Default: False
    • p:
      • Type: Number
      • Default: 1.0
      • Minimum: 0
      • Maximum: 1

FilterMaskScore

  • Type: Object
  • Category: Postprocessing
  • Description: Zeroes out mask_scores that are below a certain threshold. The threshold can be applied per category.
  • Properties:
    • score_threshold:
      • anyOf:
        • Type: Number
        • Default: 0.5
        • Minimum: 0
        • Maximum: 1
      • Type: Array
        • MinItems: 1
        • Default: [0.5]
        • Items:
        • Type: Number
        • Minimum: 0
    • always_apply:
      • Type: Boolean
      • Default: False
    • p:
      • Type: Number
      • Default: 1.0
      • Minimum: 0
      • Maximum: 1

ObjectDetectionToClassification

  • Type: Object
  • Category: Postprocessing
  • Description: Transforms an Object Detection output into a Classification output by taking the bounding box with the highest score. If the key label is passed keyword argument, this transform will ignore it.
  • Properties:
    • always_apply:
      • Type: Boolean
      • Default: False
    • p:
      • Type: Number
      • Default: 1.0
      • Minimum: 0
      • Maximum: 1

SegmentationToClassification

  • Type: Object
  • Category: Postprocessing
  • Description: Transforms a multi-class Segmentation output into a Classification output. The Segmentation output can be in terms of both probabilities (using the mask_scores keyword argument) and indices (using mask keyword argument). If both mask and mask_scores are provided, we will going to use mask to compute this transform. If the key label is passed keyword argument, this transform will ignore it.
    Caution:
    This transform does not check for pixel connections before computing the predicted area
  • Properties:
    • always_apply:
      • Type: Boolean
      • Default: False
    • p:
      • Type: Number
      • Default: 1.0
      • Minimum: 0
      • Maximum: 1

WarpPerspective

  • Type: Object
  • Category: Postprocessing
  • Description: WarpPerspective performs 4 point transformation of a region in the input image. (Reference)
  • Properties:
    • original_roi:
      • Type: array
      • Default: 0
      • Items:
        • Type: Number
        • Minimum: 0
        • Maximum: 1
    • dest_roi:
      • Type: Array
      • Default: 0
      • Items:
        • Type: Number
        • Minimum: 0
        • Maximum: 1
    • always_apply:
      • Type: Boolean
      • Default: False
    • p:
      • Type: Number
      • Default: 1.0
      • Minimum: 0
      • Maximum: 1



Was this article helpful?

What's Next