# Object detection 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 [YOLOX](https://github.com/Megvii-BaseDetection/YOLOX/blob/main/README.md) using the Qualcomm Neural Processing SDK runtime, YOLOv8 using Qualcomm AI Engine direct, and YOLOv5 and YOLOv8 using LiteRT. The following figure shows the pipeline, which receives the input from a live camera feed, file, USB source, or an RTSP stream, preprocesses it, runs inferences on AI hardware. The results are either displayed on the screen, saved as an encoded MP4 file, or streamed over the RTSP server. For information about the plugins used in the pipeline flow, see [Pipeline flow](https://docs.qualcomm.com/doc/80-80022-55/topic/gst-ai-object-detection.html#section-p2w-33y-kbc). **Figure : gst-ai-object-detection pipeline** When the software image includes the qtiqmmfsrc plugin, the camera framework uses qtiqmmfsrc by default. However, if the software image doesn't include the qtiqmmfsrc plugin, the framework automatically falls back to the libcamera. Config #1 doesn't support qtiqmmfsrc; therefore, the system uses the libcamera by default in this configuration. ## Input and output capabilities The following table summarizes the input and output capabilities supported by the sample application: | Config | Input | Input | Input | Input | Input | Output | Output | Output | | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Config | File src | RTSP | USB camera | MIPI camera | IMX577 camera | File | Display | RTSP | | Config #1 | Yes | Yes | Yes | No | Yes | Yes | Yes | Yes | | Config #2 | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | | | | | | | | | | ## Sample model and label files | Runtime | Model files | Label files | | --- | --- | --- | | Qualcomm Neural Processing SDK | *yolonas.dlc* | | | LiteRT | *yolov8\_det\_quantized.tflite*


*yolox\_quantized.tflite* | | | Qualcomm AI Engine direct | *yolov8\_det\_quantized.bin* | | | | | | | | | | ## Run the application on the target device 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. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80022-55/topic/download-model-and-label-files.html). 2. Update the config JSON file based on the model, input stream, and other properties. For more information, see [Config JSON field description](https://docs.qualcomm.com/doc/80-80022-55/topic/gst-ai-object-detection.html#section-qjx-hqq-32c). 3. Use the following format of the `/etc/configs/config_detection.json` file: > > > { > "file-path": "", > "ml-framework": "", > "yolo-model-type": "", > "model": "", > "labels": "