visualinspection.detection.yolox.postprocess
R2026bSyntax
Description
Postprocess raw predictions from a YOLOX object detector using the
visualinspection.detection.yolox.postprocess function. This function is
useful when you preprocess input images for YOLOX object detection in ONNX
Runtime.
Export a trained YOLOX object detector to an ONNX model file using the
exportONNXNetworkfunction.Preprocess test images for inference in ONNX Runtime using the
visualinspection.detection.yolox.resizeLetterboxfunction.Run the inference using the ONNX model externally or by simulating ONNX inference in MATLAB®.
Postprocess raw predictions from the ONNX inference using the
visualinspection.detection.yolox.postprocessfunction.
The detect
object function of the yoloxObjectDetector object performs the preprocessing and postprocessing
internally. If you do not need to run inference in ONNX Runtime, you can continue using the
detect function.
[
postprocesses the raw predictions bboxes,scores,labels] = visualinspection.detection.yolox.postprocess(detector,predictions)predictions of the trained YOLOX
object detector detector into bounding boxes, scores, and
labels.
[___] = visualinspection.detection.yolox.postprocess(___,
tunes the algorithm using one or more optional name-value arguments in addition to the
arguments from the previous syntax.. For example, Name=Value)ResizeFactor=3
specifies the resize factor to use to convert the raw predictions to bounding boxes as
3.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Algorithms
The visualinspection.detection.yolox.postprocess function
postprocesses the raw predictions of the YOLOX object detector using these steps.
Decodes bounding boxes from the raw predictions using anchor points and strides from the
yoloxObjectDetectorobject.Applies sigmoid activation to objectness and class prediction scores, then computes final confidence as the product of objectness and class probability.
Filters detections by removing those below the confidence threshold and outside valid size ranges.
Converts coordinates from a center-based format to a top-left corner format and scales from the network input space back to original image coordinates using the resize factor.
Applies nonmaximal suppression (NMS) to eliminate duplicate or overlapping detections of the same object, keeping only the highest confidence boxes.
Extended Capabilities
Version History
Introduced in R2026b
