# Object detection
Source: [https://docs.qualcomm.com/doc/80-70017-50/topic/gst-ai-object-detection.html](https://docs.qualcomm.com/doc/80-70017-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 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 on the plugins used in the pipeline flow, see
[Pipeline flow](https://docs.qualcomm.com/doc/80-70017-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. The video will open in a new tab.
## Prerequisites
- To run the application, push the model and label files to the device. For
instructions, see the following:
- [Download model, label, and config JSON files for Qualcomm Neural Processing SDK](https://docs.qualcomm.com/doc/80-70017-50/topic/ai-ml-sample-applications.html#ai-ml-sample-applications__section_chl_dgz_scc).
- [Download model, label and config JSON files for LiteRT and Qualcomm AI Engine direct](https://docs.qualcomm.com/doc/80-70017-50/topic/ai-ml-sample-applications.html#ai-ml-sample-applications__section_fsl_lgz_scc).
The application supports the Qualcomm Neural Processing SDK, Qualcomm AI
Engine direct, and LiteRT models.
- To access your host device, enable SSH. For instructions, see [Log in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70017-254/how_to.html#use-ssh).
Note: If SSH is already enabled, you can skip this
step.
- Push the files from the Linux host:
scp root@:/opt/Copy to clipboard
- Push the video.mp4 file in opt
folder.
- Enter the SSH shell and run the use cases:
ssh root@Copy to clipboard
- Enable the
display:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
Note: For QCS8275, the camera use cases are not supported. Use
file or RTSP as input sources.
## Run the application
The sample application uses the /opt/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.
Enter SSH shell and copy the YOLO-NAS label files to YOLOv8:
cp /opt/yolonas.labels /opt/yolov8.labelsCopy to clipboard
To run the application, use the following format of the
/opt/config\_detection.json
file:
{
"file-path": "",
"ml-framework": "",
"yolo-model-type": "",
"model": "",
"labels": "