The following is an example of a simple inference pipeline using Resnet50 model. The input for this pipeline is an NV12 YUV file (test.nv12):
The pipeline employs the Resnet50.onnx model for ML inference. First, a 1920x1080 NV12 frame is fed into the vvas_xinfer plugin. The pre-processor then resizes the frame and converts the color format to RGB, which is required by the model. In addition, mean value subtraction and normalization operations are performed on the frame. The resized and pre-processed frame is then passed to the inference library, which generates the inference predictions. These predictions are then upscaled to the original resolution (1920x1080) and attached to the output buffer.
Note
The following JSON examples are only samples. Ensure
model-pathis set to point to your available model before running.
gst-launch-1.0 filesrc location=<INPUT>.nv12 ! rawvideoparse width=<INPUT_WIDTH> height=<INPUT_HEIGHT> format=nv12 ! \
vvas_xinfer config-file=/etc/vvas/configs/infer/resnet50_onnxrt.json ! fakesink -v