# Parallel inferencing
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.
Note
This application isn't supported in the QLI 2.0 RC2 release.
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-80021-50/topic/parallel-inference-using-python.html#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
|
| Segmentations | *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-80021-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-80021-50/topic/gst-ai-parallel-inference.html#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.json
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 in the SSH shell:
gst-ai-parallel-inference -h
Copy 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-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.
|
| [qtimlpostprocess](https://docs.qualcomm.com/doc/80-80021-50/topic/qtimlpostprocess.html) | 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-80021-50/topic/parallel-inference-using-python.html)
- [Image classification](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-ai-classification.html)
- [Object detection](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-ai-object-detection.html)
- [Pose detection](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-ai-pose-detection.html)
- [Image segmentation](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-ai-segmentation.html)
Last Published: Mar 26, 2026
[Previous Topic
Image segmentation using Python with container](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/image-segmentation-using-python.md) [Next Topic
Multi input/output object detection](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-ai-multi-input-output-object-detection.md)