# Daisy chain detection and classification
Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/daisy-chain-detection-and-classification.html](https://docs.qualcomm.com/doc/80-70022-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, and runs inferences using AI hardware. The results are
either displayed on the screen, saved as an encoded MP4 file, or streamed over the RTSP
server.
For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70022-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: inception_v3_quantized.tflite
|
Detection: yolox.json
Classification: classification.json
|
## 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-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/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-runtime": "",
"classification-runtime": ""
}Copy to clipboard
For example, run the application using the custom video input file, model paths, and label
paths:
{
"input-file": "/etc/media/video.mp4",
"detection-model": "/etc/models/yolox_quantized.tflite",
"detection-labels": "/etc/labels/yolox.json",
"classification-model": "/etc/models/inception_v3_quantized.tflite",
"classification-labels": "/etc/labels/classification.json",
"detection-runtime": "dsp",
"classification-runtime": "dsp"
}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
Note: For USB camera input, set the
`video-format`, `resolution`, and
`framerate` parameters in the configuration file to match
the capabilities of the camera. To check the camera capabilities, see [Configure USB camera](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-8/usb.html#configure-usb-camera).
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-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-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.
|
| USB camera source: v4l2src |
Captures the live stream from USB camera.
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. |
| [qtimetamux](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimetamux.html) | Multiplexes the stream. |
| h264parse | Parses the video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70022-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-70022-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-70022-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-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.
|
| qtimlpostprocess for detection model | Handles inference results from any classification model.
Applies a threshold to the chosen number of results.
Loads the YOLOv8 module.
Generates results in the form of video frames with classification labels.
Produces video frames with only bounding boxes that can be cropped.
|
| qtimlpostprocess for classification model |
Applies the threshold to the chosen number of results on the cropped frame.
Loads MobileNet-softmax module.
Produces results as video frames with classification labels.
|
| [Waylandsink](https://docs.qualcomm.com/doc/80-70022-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. |
| filesink | Receives the video stream on sink pad and saves it as an H.264-encoded MP4 file. |
| qtirtspbin |
Serves as a network sink.
Transmits UDP packets to the network.
|
## 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.
|
| **output-type** | Use one of the following output-type:
waylandsink : To display output on Wayland.
filesink: To store output in file.
rtspsink: To stream output on Server.
|
| **USB camera video-format and resolution** | Use one of the following video-format
nv12
yuy2
mjpeg
Use one of the following resolution parameters:
width: Input USB camera source resolution width.
height: Input USB camera source resolution width.
framerate: Input USB camera source framerate.
|
| **output-file** | Output filename. The default output file is `output_detection.mp4`. |
| **output-ip-address and port** |
output-ip-address: Output server IP address.
port: Output server port.
|
## Known issues
- ROI isn't observed using USB camera with `yuy2` video
format.
- A drop in fps and lag is observed with the sample application on QCS6490 and
IQ9075 with both YOLOv8 and YOLOX models.
## Related information
- [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)
**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
Multi input/output object detection](https://docs.qualcomm.com/bundle/publicresource/80-70022-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-70022-50/topics/daisy-chain-detection-and-pose-detection.md)