# Daisy chain detection and classification
Source: [https://docs.qualcomm.com/doc/80-70018-50/topic/daisy-chain-detection-and-classification.html](https://docs.qualcomm.com/doc/80-70018-50/topic/daisy-chain-detection-and-classification.html)
The **gst-ai-daisychain-detection-classification** application allows you to
perform cascaded object detection and classification with a camera, file source, or RTSP
stream. The use case involves detecting objects and classifying the detected
objects.
The figures show the pipeline workflow, which captures the video stream from the source,
preprocesses the video, runs inference using AI hardware, and displays the results on
the screen.
For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70018-50/topic/daisy-chain-detection-and-classification.html#daisy-chain-detection-and-classification__section_pks_twq_pbc).
Figure : gst-ai-daisychain-detection-classification source pipeline

Figure : gst-ai-daisychain-detection-classification inference pipeline

## Sample model and label files
Table : Sample model and label files for
gst-ai-daisychain-detection-classification
| Runtime | Model files | Label files |
| :--- | :--- | :--- |
| LiteRT |
- Detection:
yolov8_det_quantized.tflite
- Classification:
mobilenet_v2_quantized.tflite
|
- Detection:
coco_labels.txt
- Classification: imagenet_labels.txt
|
## Prerequisites
- If not already done so, [Download and install eSDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51/install-sdk.html#download-and-install-esdk-).
- [Download model and label files](https://docs.qualcomm.com/doc/80-70018-50/topic/download-model-and-label-files.html).
- To access your host computer, enable SSH. For instructions, see [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh).
Note: If SSH is already enabled, you can skip this
step.
- Push the model files from the Linux host
computer.
scp root@:/etc/modelsCopy to clipboard
- Note that the [downloaded
script](https://docs.qualcomm.com/doc/80-70018-50/topic/download-model-and-label-files.html) downloads the sample video.mp4 video to
the /etc/media directory. If you are using a custom video,
then ensure that you push the video to /etc/media and
update the file path in the application config.JSON file.
- Connect the display to the device using the HDMI port. For instructions, see
[Set up HDMI display](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-18/samples.html).
- Enable the
display:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
If you face issues while enabling camera or display, see [Camera troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-17/troubleshooting.html) and [Display troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-18/debug.html).
## Run the application
The sample application uses the
/etc/configs/config\_daisychain\_detection\_classification.json
file to read the input parameters.
To create your own config JSON file, use [config_daisychain_detection_classification.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-daisychain-detection-classification/config_daisychain_detection_classification.json?ref_type=heads) as a reference.
1. Use the following format of the
config\_daisychain\_detection\_classification.json
file:
{
"input-file": "",
"detection-model": "",
"detection-labels": "",
"classification-model": "",
"classification-labels": "",
"detection-constants": "",
"classification-constants": ""
}Copy to clipboard
Note:
- 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-70018-50/topic/daisy-chain-detection-and-classification.html#daisy-chain-detection-and-classification__section_mxw_t2r_32c).
- For QCS6490, if `file-path` and
`rtsp-ip-port` are *not* present in the
configuration file, then the camera input is selected.
For example, run the application using the custom video input file,
model and label paths, and
constants:
{
"input-file": "/etc/media/video.mp4",
"detection-model": "/etc/models/yolov8_det_quantized.tflite",
"detection-labels": "/etc/labels/coco_labels.txt",
"classification-model": "/etc/models/mobilenet_v2_quantized.tflite",
"classification-labels": "/etc/labels/imagenet_labels.txt",
"detection-constants": "YOLOv8,q-offsets=<21.0, 0.0, 0.0>,q-scales=<3.0546178817749023, 0.003793874057009816, 1.0>;",
"classification-constants": "Inceptionv3,q-offsets=<38.0>,q-scales=<0.17039915919303894>;"
}Copy to clipboard
2. Run the gst-ai-daisychain-detection-classification
application:
gst-ai-daisychain-detection-classification --config-file=/etc/configs/config_daisychain_detection_classification.jsonCopy to clipboard
To display the available help options, run the following command in the SSH
shell:
gst-ai-daisychain-detection-classification -hCopy to clipboard
To
stop the use case, use CTRL + C.
## Expected output
The cropped video frame is overlaid on the frame and displayed on a local
device.
Note: The classification models trained on the
[Imagenet](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/labels/imagenet_labels.txt) dataset don't contain the
*person* class.
Figure : Expected output for gst-ai-daisychain-detection-classification
application


## Pipeline flow
The table lists the plugins used in the daisy chain detection and
classification pipeline:| Plugin | Description |
| --- | --- |
| Camera source:[qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70018-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-70018-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtimetamux](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimetamux.html) | Multiplexes the stream. |
| h264parse | Parses the video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70018-50/topic/v4l2h264dec.html) | Decodes the H.264 video stream.
The stream is forwarded to the
Wayland compositor and is rendered on a local display device.
|
| [qtivsplit](https://docs.qualcomm.com/doc/80-70018-50/topic/qtivsplit.html) | Crops full frame into smaller frames based on the detected
bounding boxes detected (maximum 4). |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimlvconverter.html) | Used by AI processing stream for preprocessing:
- Receives the video stream on its sink pad.
- Performs the following preprocessing on the stream data.
This preprocessing is done when the model expects the
floating-point values as an input.
- Color conversion
- Scaling (up or down)
- Normalization
- Converts the preprocessed video stream to a tensor stream on
its source pad.
The tensor stream is used for inferencing in the later
stages of the pipeline. |
| [qtimltflite](https://docs.qualcomm.com/doc/80-70018-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.
|
| [qtimlvdetection](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimlvdetection.html) | Handles inference results from any classification model.
- Applies a threshold to the chosen number of results.
- Loads the YOLOv5 module.
- Generates results in the form of video frames with
classification labels.
- Produces video frames with only bounding boxes that can be
cropped.
|
| [qtimlvclassification](https://docs.qualcomm.com/doc/80-70018-50/topic/qtimlvclassification.html) |
- Applies the threshold to the chosen number of results on the
cropped frame.
- Loads MobileNet module.
- Produces results as video frames with classification
labels.
- Sends them to the sink pad of qtivcomposer.
|
| [Waylandsink](https://docs.qualcomm.com/doc/80-70018-50/topic/waylandsink.html) | Submits the video stream that it's receiving on its sink pad to
the Wayland compositor, which renders the video stream on a local
display device. |
## Config JSON field description
Table : Field description–config_daisychain_detection_classification.json
file
| Field | Values/description |
| :--- | :--- |
| **Input source** |
input-file: The directory path to the video
file.
rtsp-ip-port: The address of the RTSP
stream in
rtsp://<ip>:<port>/<stream>
format.
|
| **Models and labels** |
detection-model: The path to the detection
model.
detection-labels: The path to the detection
label.
classification-model: The path to the
classification model.
classification-labels: The path to the
classification label.
detection-constants: The LiteRT detection
model constants.
classification-constants: The LiteRT
classification model constants.
|
**Parent Topic:** [Run AI/ML sample applications](https://docs.qualcomm.com/doc/80-70018-50/topic/ai-ml-sample-applications.html)
**Related Resources**
- [Image classification](https://docs.qualcomm.com/doc/80-70018-50/topic/gst-ai-classification.html)
- [Object detection](https://docs.qualcomm.com/doc/80-70018-50/topic/gst-ai-object-detection.html)
Last Published: Jan 30, 2026
[Previous Topic
Multi input/output object detection](https://docs.qualcomm.com/bundle/publicresource/80-70018-50/topics/gst-ai-multi-input-output-object-detection.md) [Next Topic
Daisy chain detection and pose estimation](https://docs.qualcomm.com/bundle/publicresource/80-70018-50/topics/daisy-chain-detection-and-pose-detection.md)