# Image classification and display with LiteRT
Source: [https://docs.qualcomm.com/doc/80-70018-50/topic/single-camera-stream-with-image-classification-and-display.html](https://docs.qualcomm.com/doc/80-70018-50/topic/single-camera-stream-with-image-classification-and-display.html)
The use cases use the Inceptionv3 LiteRT model to classify scenes from a single
camera stream and either overlay or compose the classification labels.
## Use qtivoverlay plugin to apply classification overlay
Run this use
case:
gst-launch-1.0 -e --gst-debug=2 qtiqmmfsrc name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! \
tee name=split split. ! queue ! qtimetamux name=metamux ! queue ! qtivoverlay ! queue ! waylandsink fullscreen=true \
split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/inception_v3_quantized.tflite ! queue ! \
qtimlvclassification threshold=40.0 results=2 module=mobilenet labels=/etc/labels/classification.labels \
constants="Inceptionv3,q-offsets=<38.0>,q-scales=<0.17039915919303894>;" ! text/x-raw ! queue ! metamux.Copy to clipboard
To stop the use case, use CTRL + C.
Figure : Pipeline for classification overlay

The figure shows the flow of the use case execution:
1. Classify scenes from a video stream coming through a camera source.
2. Overlay the classification labels using overlaylib.
3. Display the results.
The table provides the sequential processing stages of the pipeline execution:
| Process | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70018-50/topic/qtiqmmfsrc.html) |
- Collects the video stream (source) and creates two copies of
the source:
- One stream is sent to the qtimetamux plugin to
retain the video stream.
- The other stream is sent to an ML inferencing
pipeline.
|
| **Preprocessing** | **Preprocessing** |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimlvconverter.html) |
- Receives the video stream on its sink pad.
- Performs preprocessing:
- Color conversion
- Scaling down/up
- Normalization on the stream data when the model
expects the floating point values as an input
- Converts the video stream to a tensor stream on its source
pad.The classification model uses this tensor stream
for inferencing.
|
| **Inferencing** | **Inferencing** |
| [qtimltflite](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimltflite.html) |
- Loads the model.
- Modifies the graph for the chosen delegate.
- Receives the tensor stream on its sinkpad.
- Runs the inference and produces a tensor stream with the
inference results on its source pad.
|
| **Postprocessing** | **Postprocessing** |
| [qtimlvclassification](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimlvclassification.html) |
- Receives the inference tensors from a classification model
on its sinkpad.
- Converts the tensors into formats such as video or text that
the multimedia plugins can process later.
- Applies the threshold to the chosen number of results.
- Loads the corresponding modules of the classification
models. In this use case, qtimlvclassification does the
following:
- Loads the submodule of the model.
- Produces results as structures of text.
- Sends them to the sinkpad of qtimetamux.
|
| [qtimetamux](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimetamux.html) |
- Receives the video stream and text stream with
classification results corresponding to the video stream on
its sinkpads.
- Produces GST buffers with the contents of video stream on
its sink pad.
- Adds classification result from data sinkpad to GST buffer
meta (meta muxing) on its source pad.
|
| [qtivoverlay](https://docs.qualcomm.com/doc/80-70018-50/topic/qtioverlay.html) |
- Receives the multiplexed stream.
- Overlays the classification labels on the VideoFrame using
CL.
- Produces GST buffers with overlays in its source pad.
|
| **Output** | **Output** |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70018-50/topic/waylandsink.html) |
- Receives the video stream on its sinkpad.
- Submits the video stream to Weston.
- Weston renders the video stream and possible classifications
generated for that scene on a local display device.
|
## Use qtivcomposer to mix original frame with classification mask
Run this use
case:
gst-launch-1.0 -e --gst-debug=2 qtiqmmfsrc name=camsrc ! video/x-raw,format=NV12_Q08C,width=1280,height=720,framerate=30/1 ! queue ! \
tee name=split split. ! queue ! qtivcomposer name=mixer sink_1::position="<30, 30>" sink_1::dimensions="<480, 480>" ! queue ! waylandsink fullscreen=true \
split. ! queue ! qtimlvconverter ! queue ! qtimltflite delegate=external external-delegate-path=libQnnTFLiteDelegate.so \
external-delegate-options="QNNExternalDelegate,backend_type=htp;" model=/etc/models/inception_v3_quantized.tflite ! queue ! \
qtimlvclassification threshold=40.0 results=2 module=mobilenet labels=/etc/labels/classification.labels \
constants="Inceptionv3,q-offsets=<38.0>,q-scales=<0.17039915919303894>;" ! video/x-raw,format=BGRA,width=640,height=480 ! queue ! mixer.Copy to clipboard
To stop the use case, select CTRL +
C.
Figure : Pipeline for classification with qtivcomposer

The figure shows the flow of the use case execution:
1. Classify scenes from a video stream coming through a camera source.
2. Compose classification labels and video stream using qtivcomposer.
3. Display the results.
The table provides the sequential processing stages of the pipeline execution:
| Process | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70018-50/topic/qtiqmmfsrc.html) |
- Collects the video stream (source) and creates two copies of
the source:
- One stream is sent to the qtivcomposer plugin to
retain the video stream.
- The other stream is sent to the ML inferencing
branch in the pipeline.
|
| **Preprocessing** | **Preprocessing** |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimlvconverter.html) |
- Receives the video stream on its sink pad.
- Performs preprocessing:
- Color conversion
- Scaling down/up
- Normalization on the stream data when the model
expects the floating point values as an input
- Converts the video stream to a tensor stream on its source
pad.The classification model uses this tensor stream
for inferencing.
|
| **Inferencing** | **Inferencing** |
| [qtimltflite](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimltflite.html) |
- Loads the model.
- Modifies the graph for the chosen delegate.
- Receives the tensor stream on its sinkpad.
- Runs the inference and produces a tensor stream with the
inference results on its source pad.
|
| **Postprocessing** | **Postprocessing** |
| [qtimlvclassification](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimlvclassification.html) |
- Receives the inference results from a classification model
on its sinkpad.
- Converts the inference tensors into formats like video or
text that the multimedia plugins can process later.
- Applies the threshold to the chosen number of results.
- Loads the corresponding modules for the classification
models. In this use case, qtimlvclassification does the
following:
- Loads the submodule of the model.
- Produces results as video frames with classification
labels.
- Sends them to the sinkpad of qtivcomposer.
|
| [qtivcomposer](https://docs.qualcomm.com/doc/80-70018-50/topic/qtivcomposer.html) |
- Receives the original video stream with classification
results on its sinkpads.
- On its sourcepad, produces GST buffers with contents
composed of video streams from its sinkpads.
|
| **Output** | **Output** |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70018-50/topic/waylandsink.html) |
- Receives the video in its sinkpad
- Submits the video stream to Weston.
- Weston renders the video stream and possible classifications
generated for that scene on a local display device.
|
**Parent Topic:** [LiteRT use cases](https://docs.qualcomm.com/doc/80-70018-50/topic/tensorflow-lite-use-cases.html)
Last Published: Jan 30, 2026
[Previous Topic
LiteRT use cases](https://docs.qualcomm.com/bundle/publicresource/80-70018-50/topics/tensorflow-lite-use-cases.md) [Next Topic
Image classification and encode with LiteRT](https://docs.qualcomm.com/bundle/publicresource/80-70018-50/topics/single-camera-stream-with-image-classification-and-encode.md)