# Parallel inference using Python
The **gst-parallel-inference.py** application receives a video input from a camera, file, or an RTSP stream and sends it for a four-channel parallel processing by AI models (classification, object detection, pose detection and segmentation). The output is displayed as a preview with the overlaid AI models.
Note
This application isn't supported in the QLI 2.0 RC2 release because the Python bindings aren't enabled.
**Figure : gst-parallel-inference.py pipeline**
For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-80021-50/topic/parallel-inference-using-python.html#section-gcg-r3s-lbc).
## Model and label files
The following table lists the model and label files that should be available on the device before running the application.
Table : Default model and label files for gst-parallel-inference.py
| Inference | Model directory | Label directory |
| --- | --- | --- |
| Object detection | `/etc/models/yolox_quantized.tflite` | `/etc/labels/yolox.json` |
| Pose estimation | `/etc/models/hrnet_pose_quantized.tflite` |
etc/labels/hrnet_pose.json
hrnet_settings.json
|
| Segmentation | `/etc/models/deeplabv3_plus_mobilenet_quantized.tflite` | `/etc/labels/deeplabv3_resnet50.json` |
| Classification | `/etc/models/inception_v3_quantized.tflite` | `/etc/labels/classification.json` |
## Run the application on the target device
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80021-50/topic/prerequisites-for-python-sample-applications.html).
2. Ensure that the [Model and label files](https://docs.qualcomm.com/doc/80-80021-50/topic/parallel-inference-using-python.html#section-sz5-51j-pdc) are available on the target device.
3. Rename the label files on the EVK:
cp /etc/labels/yolonas.json /etc/labels/yolox.json
Copy to clipboard
Note
For Ubuntu Server, run the above command with `sudo`.
4. Run the use cases:
- Input from the camera:
gst-parallel-inference.py --camera
Copy to clipboard
- Input from a file:
gst-parallel-inference.py --file "/etc/media/video.mp4"
Copy to clipboard
- Input from an RTSP stream:
gst-parallel-inference.py --rtsp "rtsp://:/"
Copy to clipboard
Note
If a drop in performance is observed, you can use YOLOv8 LiteRT model. For YOLOv8 export instructions, see Step 6 in [Prerequisites](https://docs.qualcomm.com/doc/80-80021-50/topic/download-model-and-label-files.html).
5. To display the available help options, run the following command:
gst-parallel-inference.py -h
Copy to clipboard
## Expected output
After performing the four parallel inferences, the results are displayed side by side on the screen.

**Figure : Expected output for gst-ai-parallel-inference.py application**
## Pipeline flow
The following table lists the plugins used in the parallel inference pipeline:
| Plugin | Description |
| --- | --- |
| Camera source:[qtiqmmfsrc](https://docs.qualcomm.com/doc/80-80021-50/topic/qtiqmmfsrc.html) |
Captures the live stream from camera.
Uses tee to split the stream for inferencing.
|
| File source: filesrc |
Captures the video stream using filesrc, followed by qtdemux, which demultiplexes the stream.
Uses tee to split the stream for inferencing.
|
| RTSP source: rtspsrc |
Captures the RTSP stream using rtspsrc, followed by rtph264depay for video extraction.
Uses tee to split the stream for inferencing.
|
| h264parse | Parses the H.264 video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h264dec.html) | Decodes the video |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-80021-50/topic/qtimlvconverter.html) |
Receives the video stream on its sink pad.
Performs the following preprocessing on the stream data. This preprocessing is done when the model expects floating-point values as input.
Color conversion
Scaling (up or down)
Normalization
The tensor stream is used for inferencing in the later stages of the pipeline. |
| [qtimltflite](https://docs.qualcomm.com/doc/80-80021-50/topic/qtimltflite.html) |
After the inference runtime receives the tensor stream on its sink pad, it runs the inference.
Produces a tensor stream with the inference results on its source pad.
|
| Postprocessing plugins | - Handles the inference results from any object detection, classification, pose detection, and segmentation model. -
qtimlpostprocess for detection use case
Applies a threshold to the chosen number of results.
Loads the YOLOv8 module.
Produces video frames with only bounding boxes that can be overlaid on objects, sending them to the sink pad of the qtivcomposer.
qtimlpostprocess for classification use case
Applies the threshold to the chosen number of results.
Loads the MobileNet-softmax module.
Produces results as video frames with classification labels, sending them to the sink pad of the qtivcomposer.
qtimlpostprocess for pose estimation use case
Applies the threshold to the chosen number of results.
Loads the corresponding modules for various pose estimation models. For the use cases described in this section, qtimlpostprocess loads the HRNet module.
Produces results as video frames with poses drawn, sending them to the sink pad of the qtivcomposer.
qtimlpostprocess for segmentation use case: Converts the inference tensors that it receives on its sink pad into video formats that the multimedia plugins for further processing.
Waylandsink submits the video stream received on its sink pad to Weston.
Weston renders the video stream on a local display.
|
## Related information
[Parallel inferencing](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-ai-parallel-inference.html)
Last Published: Mar 26, 2026
[Previous Topic
Object detection, classification, and segmentation](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/object-detection-classification-and-segmentation-python-sample-app.md) [Next Topic
Daisy chain detection and pose detection using Python](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/daisy-chain-detection-and-pose-detection-using-python.md)