# Parallel inferencing
Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-parallel-inference.html](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-parallel-inference.html)
The **gst-ai-parallel-inference** application allows you to perform object
detection, object classification, pose detection, and image segmentation on an input stream
from different sources such as a camera, a file, or an RTSP network. The use cases implement
the LiteRT models for object detection, image segmentation, classification, and pose
detection.
The following figure shows the pipeline, which receives input streams
from a camera, file, or an RTSP stream, performs the parallel inferencing for the four
use cases, and displays the results side by side on the screen.
For information about the plugins used in the pipeline flow, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-parallel-inference.html#gst-ai-parallel-inference__section_gcg_r3s_lbc).
Figure : gst-ai-parallel-inference pipeline
## Sample model and label files
Table : Sample model and label files for gst-ai-parallel-inference
| Application | Model files | Label files |
| --- | --- | --- |
| Object detection | yolox_quantized.tflite | yolox.json |
| Pose estimation | hrnet_pose_quantized.tflite |
hrnet_pose.json
hrnet_settings.json
|
| Segmentation | deeplabv3_plus_mobilenet_quantized.tflite | deeplabv3_resnet50.json |
| Classification | inception_v3_quantized.tflite | classification.json |
## Run the application on the target device
Note: The commands in this section are targeted for the sample
applications based on QLI GA 1.5 (PPA version 05900 in Ubuntu) or later releases.
Run the `apt-cache policy gstreamer1.0-qcom-sample-apps` command to
check your QIM version. If you are using sample applications from older versions,
run the application with the `--help` option for more
instructions.
The sample application uses the
/etc/configs/config-parallel-inference.json file to read
the input parameters.
To create your own config JSON file, use [config-parallel-inference.json](https://git.codelinaro.org/clo/le/platform/vendor/qcom-opensource/gst-plugins-qti-oss/-/blob/imsdk.lnx.2.0.0.r2-rel/gst-sample-apps/gst-ai-parallel-inference/config-parallel-inference.json) as a
reference.
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70022-50/topic/download-model-and-label-files.html).
2. Update the config JSON file based on the model, input stream, and other
properties. For more information, see [Config JSON field description](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-parallel-inference.html#gst-ai-parallel-inference__section_hwy_xqm_nfc).
For QCS6490, if
`file-path` and `rtsp-ip-port` are
*not* present in the configuration file, then the camera input is
selected.
3. Use the following format of the
config-parallel-inference.json
file:
{
"camera": "",
"file-path": "",
"rtsp-ip-port": "",
"detection-model": "",
"detection-labels": "",
"pose-model": "",
"pose-labels": "",
"pose-settings-path": "",
"segmentation-model": "",
"segmentation-labels": "",
"classification-model": "",
"classification-labels": ""
}Copy to clipboard
For example, run the application using
the custom video input file, model paths, and label
paths:
{
"file-path": "/etc/media/video.mp4",
"detection-model": "/etc/models/yolox_quantized.tflite",
"detection-labels": "/etc/labels/yolox.json",
"pose-model": "/etc/models/hrnet_pose_quantized.tflite",
"pose-labels": "/etc/labels/hrnet_pose.json",
"pose-settings-path": "/etc/labels/hrnet_settings.json",
"segmentation-model": "/etc/models/deeplabv3_plus_mobilenet_quantized.tflite",
"segmentation-labels": "/etc/labels/deeplabv3_resnet50.json",
"classification-model": "/etc/models/inception_v3_quantized.tflite",
"classification-labels": "/etc/labels/classification.json"
}Copy to clipboard
4. Run the gst-ai-parallel-inference
application:
gst-ai-parallel-inference --config-file=/etc/configs/config-parallel-inference.jsonCopy 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-70022-50/topic/download-model-and-label-files.html).
5. To display the available help options, run the following command in the SSH
shell:
gst-ai-parallel-inference -hCopy to clipboard
6. To stop the use case, use CTRL +
C.
## 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 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-70022-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-70022-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70022-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-70022-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 | qtimlpostprocess 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.
|
## Config JSON field description
The different parameters available to configure the JSON file and run the use case
are as follows:
Table : Field description–config-parallel-inference.json file
| Field | Values/description |
| :--- | :--- |
| **Input source** | Use one of the following input sources:
camera: Primary (0) or secondary (1).
file-path: The directory path to the video file.
rtsp-ip-port: The address of the RTSP stream: rtsp://<ip>:<port>/<stream>
|
| **Models and labels** |
detection-model: The path to the detection model.
detection-labels: The path to the detection label.
pose-model: The path to the pose model.
pose-labels: The path to the pose labels.
segmentation-model: The path to the segmentation model.
segmentation-labels: The path to the segmentation labels.
classification-model: The path to the classification model.
classification-labels: The path to the classification labels.
|
## Known issues
- Identifies the pose of only one person even if many people are present in the
frame.
- Inception V3 model doesn't include people class. This model is trained on an
Imagenet dataset and is used in classification.
- Lag is observed in a long run scenario using camera source.
## Related information
- [Parallel inference using Python](https://docs.qualcomm.com/doc/80-70022-50/topic/parallel-inference-using-python.html)
- [Image classification](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-classification.html)
- [Object detection](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-object-detection.html)
- [Pose detection](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-pose-detection.html)
- [Image segmentation](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-ai-segmentation.html)
**Parent Topic:** [Run AI/ML sample applications](https://docs.qualcomm.com/doc/80-70022-50/topic/ai-ml-sample-applications.html)
Last Published: Feb 20, 2026
[Previous Topic
Image segmentation using Python with container](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/image-segmentation-using-python.md) [Next Topic
Multi input/output object detection](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/gst-ai-multi-input-output-object-detection.md)