# Daisy chain detection and classification
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/daisy-chain-detection-and-classification.html](https://docs.qualcomm.com/doc/80-70020-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 following figures show the pipeline workflow, which captures the video stream from
the source, preprocesses it, runs inferences 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-70020-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: yolox_quantized.tflite
Classification: mobilenet_v2_quantized.tflite
|
Detection: coco_labels.txt
Classification: imagenet_labels.txt
|
## Run the application on the target device
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. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70020-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-70020-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.
3. 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
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/yolox_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": "YOLOx,q-offsets=<38.0, 0.0, 0.0>,q-scales=<3.6124823093414307, 0.003626860911026597, 1.0>;",
"classification-constants": "Inceptionv3,q-offsets=<38.0>,q-scales=<0.17039915919303894>;"
}Copy to clipboard
4. Run the gst-ai-daisychain-detection-classification
application:
gst-ai-daisychain-detection-classification --config-file=/etc/configs/config_daisychain_detection_classification.jsonCopy to clipboard
5. To display the available help options, run the following command in the SSH
shell:
gst-ai-daisychain-detection-classification -hCopy to clipboard
6. 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 following table lists the plugins used in the daisy chain detection and
classification pipeline:| Plugin | Description |
| --- | --- |
| Camera source:[qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70020-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-70020-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtimetamux](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimetamux.html) | Multiplexes the stream. |
| h264parse | Parses the video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70020-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-70020-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-70020-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-70020-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-70020-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.
|
| [Waylandsink](https://docs.qualcomm.com/doc/80-70020-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
The different parameters available to configure the JSON file and run the use case
are as follows:
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.
|
## Related information
- [Image classification](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-classification.html)
- [Object detection](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-object-detection.html)
**Parent Topic:** [Run AI/ML sample applications](https://docs.qualcomm.com/doc/80-70020-50/topic/ai-ml-sample-applications.html)
Last Published: Jan 30, 2026
[Previous Topic
Multi input/output object detection](https://docs.qualcomm.com/bundle/publicresource/80-70020-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-70020-50/topics/daisy-chain-detection-and-pose-detection.md)