# Object detection and classification The **gst-camera-two-stream-detection-and-classification-side-by-side.py** application uses a YOLOX LiteRT model to detect and `inception_v3` to classify objects in the scene displayed by the AI overlay composer. Note This application isn't supported in the QLI 2.0 RC2 release because the Python bindings aren't enabled. **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-80021-50/topic/camera-ai-detection-overlay-composer-display.html#section-l1h-cpk-bdc). ## Model files Table : Models used for detection and classification | Purpose | LiteRT model | Description | | --- | --- | --- | | Object detection | YOLOX |
Identify the object in a scene from a camera stream.
Overlay the bounding boxes over the detected objects.
Classify a scene from a camera stream.
Overlay the classification labels on the screen.
Stream for detection is split using tee and sent to the following:
qtimetamux to retain the video stream.
qtimlvconverter to convert the video stream to input tensors for the detection inference.
Stream for classification is split using tee and sent to the following:
qtimetamux to retain the video stream.
qtimlvconverter to convert the video stream to input tensors for the classification inference.
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.
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.
Receives the inference tensors from the object detection model.
Converts the inference tensors on its sinkpad 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 for detection models.
Loads the YOLOv8 submodule.
Produces results as structures of text.
Sends them to the sinkpad of qtimetamux.
Receives the inference results from a classification model on its sinkpad.
Converts the inference 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 for the classification models.
Loads the submodule of the model.
Produces results as video frames with classification labels.
Sends them to the sinkpad of qtivcomposer.
Receives video stream and text stream with bounding box results corresponding to the video stream on its sinkpads.
Produces GST buffers with contents of the video stream from its sink pad.
Adds bounding boxes as GstVideoRegionOfInterest from data sinkpad to GST buffers meta (meta muxing) on its source pad.
Receives the multiplexed stream.
Overlays the bounding boxes on the VideoFrame using CL.
Produces GST buffers with overlays in its source pad.
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.
Receives the video in its sinkpad
Submits the video stream to Weston.
Weston renders the video stream on a local display device.