# Object detection and classification Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/camera-ai-detection-overlay-composer-display.html](https://docs.qualcomm.com/doc/80-70020-50/topic/camera-ai-detection-overlay-composer-display.html) The **gst-camera-two-stream-detection-and-classification-side-by-side.py** application uses a YOLOv8 LiteRT model to detect and classify objects in the scene displayed by the AI overlay composer. Figure : Pipeline for object detection and classification For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70020-50/topic/camera-ai-detection-overlay-composer-display.html#camera-ai-detection-overlay-composer-display__section_l1h_cpk_bdc). ## Model files Table : Models used for detection and classification | Purpose | LiteRT model | Description | | :--- | :--- | :--- | | Object detection | YOLOv8 |

  1. Identify the object in a scene from a camera stream.


  2. Overlay the bounding boxes over the detected objects.


| | Image classification | Resnet101 |

  1. Classify a scene from a camera stream.


  2. Overlay the classification labels on the screen.


| ## Run the application on the target device 1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70020-50/topic/prerequisites-for-python-sample-applications.html). 2. Export the YOLOv8 model and download the `Resnet101` having w8a8 precision model from AI Hub. Update the model name in the commands with the appropriate model name as downloaded through AI Hub. 3. Run the detection and classification script on the target device: gst-camera-two-stream-detection-and-classification-side-by-side.pyCopy to clipboard 4. To display the available help options, run the following command: gst-camera-two-stream-detection-and-classification-side-by-side.py -hCopy to clipboard Table : Default directories for model and label files for object detection and classification python application | Model and label files | Directory | | :--- | :--- | | Detection model | /etc/models/YoloV8N\_Detection\_Quantized.tflite | | Detection labels | /etc/labels/yolov8n.labels | | Classification model | /etc/models/Resnet101\_Quantized.tflite | | Classification labels | /etc/labels/resnet101.labels | ## Expected output The images are shown side by side on the display. ## Pipeline flow | Process | Description | | --- | --- | | [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70020-50/topic/qtiqmmfsrc.html) | Collects two video streams from the camera: | | **Preprocessing** | **Preprocessing** | | [qtimlvconverter](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimlvconverter.html) |

  1. Receives the video stream on its sink pad.


  2. Performs preprocessing:


  3. 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-70020-50/topic/qtimltflite.html) |

  1. Loads the model.


  2. Modifies the graph for the chosen delegate.


  3. Receives the tensor stream on its sinkpad.


  4. Runs the inference and produces a tensor stream with the
    inference results on its source pad.


| | **Postprocessing** | **Postprocessing** | | [qtimlvdetection](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimlvdetection.html) |

  1. Receives the inference tensors from the object detection
    model.


  2. Converts the inference tensors on its sinkpad into formats
    such as video or text that the multimedia plugins can
    process later.


  3. Applies the threshold to the chosen number of results.


  4. Loads the corresponding modules for detection models.

    In
    this use case, qtimlvdetection does the following:


    1. Loads the YOLOv8 submodule.


    2. Produces results as structures of text.


    3. Sends them to the sinkpad of qtimetamux.





| | [qtimlvclassification](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimlvclassification.html) |

  1. Receives the inference results from a classification model
    on its sinkpad.


  2. Converts the inference tensors into formats such as video or
    text that the multimedia plugins can process later.


  3. Applies the threshold to the chosen number of results.


  4. Loads the corresponding modules for the classification
    models.

    In this use case, qtimlvclassification does the
    following:


    1. Loads the submodule of the model.


    2. Produces results as video frames with classification
      labels.


    3. Sends them to the sinkpad of qtivcomposer.





| | [qtimetamux](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimetamux.html) |

  1. Receives video stream and text stream with bounding box
    results corresponding to the video stream on its
    sinkpads.


  2. Produces GST buffers with contents of the video stream from
    its sink pad.


  3. Adds bounding boxes as GstVideoRegionOfInterest from data
    sinkpad to GST buffers meta (meta muxing) on its source
    pad.


| | [qtivoverlay](https://docs.qualcomm.com/doc/80-70020-50/topic/qtioverlay.html) |

  1. Receives the multiplexed stream.


  2. Overlays the bounding boxes on the VideoFrame using CL.


  3. Produces GST buffers with overlays in its source pad.


| | [qtivcomposer](https://docs.qualcomm.com/doc/80-70020-50/topic/qtivcomposer.html) |

  1. Receives the original video stream with classification
    results on its sinkpads.


  2. On its sourcepad, produces GST buffers with contents
    composed of video streams from its sinkpads.


| | **Output** | **Output** | | [Waylandsink](https://docs.qualcomm.com/doc/80-70020-50/topic/waylandsink.html) |

  1. Receives the video in its sinkpad


  2. Submits the video stream to Weston.


  3. Weston renders the video stream on a local display
    device.


| ## Related information - [Object detection](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-object-detection.html) - [Image classification](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-classification.html) **Parent Topic:** [Python applications](https://docs.qualcomm.com/doc/80-70020-50/topic/python-sample-applications.html) Last Published: Jan 30, 2026 [Previous Topic Decode JPEG images using Python](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/decode-jpeg-images-using-python.md) [Next Topic Transform and encode a camera stream](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/camera-transform-downscale-and-rotate-encode.md)