# Object detection
Source: [https://docs.qualcomm.com/doc/80-70014-50/topic/gst-ai-object-detection.html](https://docs.qualcomm.com/doc/80-70014-50/topic/gst-ai-object-detection.html)
The **gst-ai-object-detection** application enables you to detect objects within
images and videos. The use cases demonstrate the execution of [YOLOv5](https://github.com/ultralytics/yolov5), [YOLOv8](https://github.com/ultralytics/ultralytics), and [YOLO-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) using the Qualcomm Neural Processing SDK
runtime.
The figure shows the pipeline, which receives the live camera feed, performs
preprocessing, runs inferences on AI hardware, and displays the results on the screen.
For information on the plugins used in the pipeline flow, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70014-50/topic/gst-ai-object-detection.html#gst-ai-object-detection__section_p2w_33y_kbc).
Figure : gst-ai-object-detection pipeline

This video guides you through setting up a live camera feed, implementing preprocessing
steps, executing AI inferences on dedicated hardware, and displaying the detection
results live.
## Prerequisites
- Push the model and label files to the device to run the application. For more
information, see [Download the model and label files](https://docs.qualcomm.com/doc/80-70014-50/topic/ai-ml-sample-applications.html#ai-ml-sample-applications__prereq_v23_cxc_gbc).
- Enable SSH in Permissive mode to securely access your host device. For
instructions, see [How to SSH?](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/how_to.html#how-to-ssh-)
- Use the following command to enter the SSH shell and execute the use
cases:
ssh root@Copy to clipboard
- Run the following command to enable the Permissive
mode:
setenforce 0Copy to clipboard
- Run the following command to enable the
display:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
- Run the following command to push the files from host
machine:
scp root@:/opt/Copy to clipboard
## Use cases
Run the object detection models using Qualcomm Neural Processing SDK runtime. By
default, the system executes YOLO-NAS.
Note: The following commands provide the default model and label
paths. If you have a different folder structure, replace the default paths in the
command line parameters.
gst-ai-object-detection --model-type=3 --model=/opt/yolonas.dlc --labels=/opt/yolonas.labelsCopy to clipboard
To display the available help options, run the following
command:
gst-ai-object-detection -hCopy to clipboard
To
stop the use case, press CTRL + C.
## Expected output
The detected objects are displayed.
Figure : Expected output for gst-ai-object-detection application

## Pipeline flow
The table lists the plugins used to execute the object detection
pipeline:| Plugin | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70014-50/topic/qtiqmmfsrc.html) | Captures the camera live stream and employs the tee to split the stream for inferencing. |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70014-50/topic/qtimlvconverter.html) |
Receives the video stream on its sink pad.
Performs the following preprocessing on the stream data. This is done when the model expects floating-point values as 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. |
| [qtimlsnpe](https://docs.qualcomm.com/doc/80-70014-50/topic/qtimlsnpe.html) | The qtimlsnpe ML inferencing plugin is used with the Qualcomm Neural Processing SDK runtime. It does the following:
Leverages YOLOv5, YOLOv8, and YOLO-NAS for object detection. Any of the YOLO models can be executed from the command-line parameter.
After the inference runtime receives the tensor stream on its sink pad, it executes the inference.
Produces a tensor stream with the inference results on its source pad.
|
| [qtimlvdetection](https://docs.qualcomm.com/doc/80-70014-50/topic/qtimlvdetection.html) | Handles inference results from any object detection model.
Applies a threshold to the chosen number of results.
Loads the YOLO-NAS module.
Produces video frames with only bounding boxes that can be overlaid on objects.
Sends these processed frames to the sink pad of qtivcomposer.