# Object detection
Source: [https://docs.qualcomm.com/doc/80-70018-50/topic/gst-ai-object-detection.html](https://docs.qualcomm.com/doc/80-70018-50/topic/gst-ai-object-detection.html)
The **gst-ai-object-detection** application allows you to detect objects within
images and videos. The use cases show 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,
YOLOv8 using Qualcomm AI Engine direct, and YOLOv5 and YOLOv8 using LiteRT.
The figure shows the pipeline, which receives the input from a live camera feed, file, or
an RTSP stream, performs preprocessing, runs inferences on AI hardware, and displays the
results on the screen. For information about the plugins used in the pipeline flow, see
[Pipeline flow](https://docs.qualcomm.com/doc/80-70018-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, running AI inferences on dedicated hardware, and displaying the detection results
live. The video will open in a new tab.
## Sample model and label files
| Runtime | Model files | Label files |
| --- | --- | --- |
| Qualcomm Neural Processing SDK | *yolonas.dlc* |
yolonas.labels
yolov8.labels
|
| LiteRT | *yolov8\_det\_quantized.tflite* |
yolonas.labels
yolov8.labels
|
| Qualcomm AI Engine direct | *yolov8\_det\_quantized.bin* |
yolonas.labels
yolov8.labels
|
| | | |
| | | |
Note: The YOLOv8 Qualcomm AI Engine direct SDK model isn't
supported in the current release.
## Prerequisites
- If not already done so, [Download and install eSDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51/install-sdk.html#download-and-install-esdk-).
- To run the application, push the model and label files to the device. For
instructions, see [Download model and label files](https://docs.qualcomm.com/doc/80-70018-50/topic/download-model-and-label-files.html).
The
application supports the Qualcomm Neural Processing SDK, Qualcomm AI Engine
direct, and LiteRT models.
- To access your host computer, enable SSH. For instructions, see [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh).
Note: If SSH is already enabled, you can skip this
step.
- Push the model files from the Linux host computer:
scp root@:/etc/modelsCopy to clipboard
- Note that the [downloaded
script](https://docs.qualcomm.com/doc/80-70018-50/topic/download-model-and-label-files.html) downloads the sample video.mp4 video to
the /etc/media directory. If you are using a custom video,
then ensure that you push the video to /etc/media and
update the file path in the application config.JSON file.
- Connect the display to the device using the HDMI port. For instructions, see
[Set up HDMI display](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-18/samples.html).
- Enable the
display:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
If you face issues while enabling camera or display, see [Camera troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-17/troubleshooting.html) and [Display troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-18/debug.html).
## Run the application
The sample application uses the
/etc/configs/config\_detection.json file to read the input
parameters.
To create your own config JSON file, use [config_detection.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-object-detection/config_detection.json?ref_type=heads) as a reference.
1. Enter the second SSH shell and copy the YOLO-NAS label files to YOLOv8:
cp /etc/labels/yolonas.labels /etc/labels/yolov8.labelsCopy to clipboard
2. Use the following format of the
/etc/configs/config\_detection.json
file:
{
"file-path": "",
"ml-framework": "",
"yolo-model-type": "",
"model": "",
"labels": "