# Run a sample application with a custom trained model

It uses a custom-trained YoloV8 model as an example.

Prerequisites

1. Set up the extensible SDK (eSDK) to develop application/plugin code.

    See the [Qualcomm Intelligent Multimedia Software Development Kit (IM SDK) Quick Start Guide](https://docs.qualcomm.com/doc/80-80022-51/topic/introduction.html)
for instructions on setting up the eSDK and downloading and compiling the source code.
2. See [Develop your own AI/ML application](https://docs.qualcomm.com/doc/80-80022-15B/topic/develop-your-own-application.html) for instructions on
downloading the source code and compiling custom reference apps.
3. [Download model and label files for Qualcomm Neural Processing SDK](https://docs.qualcomm.com/doc/80-80022-15B/topic/classify-objects-with-default-model.html#download-model-files).

## Use a custom trained YoloV8 LiteRT model

Qualcomm IM SDK reference applications use the YoloV8 model for
object detection. This example explains how you can try a
custom trained YoloV8 variant.

Use the following steps to run your own custom-trained YoloV8 model
with the current reference application.

1. Replace the existing model with your new model in the reference app.
2. Modify the label files with custom labels.
3. Run the reference application with the modified model.

### Modify the labels

When using Qualcomm IM SDK and its reference apps, the apps expect
labels in the JSON format. You need to update `<ID value>`,
`<color value>`, and `<label value>` values
for each label within this labels file.

The format of each label within the labels file should follow the
template shown below.

[
       {"id":  0, "color": "0x00FF00FF", "label": "person"}
    ]
    Copy to clipboard

For example:

[
       {"id":  0, "color": "0x00FF00FF", "label": "person"},
       {"id":  1, "color": "0x00FF00FF", "label": "bicycle"},
       {"id":  2, "color": "0x0000FFFF", "label": "car"},
       {"id":  3, "color": "0x00FF00FF", "label": "motorcycle"}
    ]
    Copy to clipboard

### Run object detection using the custom model

To run object detection models using the LiteRT runtime, specify the
custom trained model along with your custom label files in the
command-line parameters and run the following commands.

1. On the host device, run the following command:

export USER=root
        Copy to clipboard
2. Copy the model to the device.

scp yolov8_custom.tflite $USER@<IP address of the target device>:/etc/models/
        Copy to clipboard
3. Copy the labels to the device.

scp yolov8_custom.json $USER@<IP address of the target device>:/etc/labels/
        Copy to clipboard
4. Sign in to the device.

ssh $USER@<IP address of the target device>
        Copy to clipboard
5. Modify the `/etc/configs/config_detection.json` file as shown.

{
        "file-path": "/etc/media/video.mp4",
        "ml-framework": "tflite",
        "yolo-model-type": "yolov8",
        "model": "/etc/models/yolov8_custom.tflite",
        "labels": "/etc/labels/yolov8_custom.json",
        "threshold": 40,
        "runtime": "dsp"
        }
        Copy to clipboard
6. Run the sample application.

gst-ai-object-detection --config-file=/etc/configs/config_detection.json
        Copy to clipboard

Notes

- To display the available help options, run the following command:

gst-ai-object-detection -h
        Copy to clipboard
- To stop the use case, use <kbd class="kbd compound docutils literal notranslate"><kbd class="kbd docutils literal notranslate">CTRL</kbd>+<kbd class="kbd docutils literal notranslate">C</kbd></kbd>.

Last Published: May 14, 2026

[Previous Topic
Classify objects using a default model](https://docs.qualcomm.com/bundle/publicresource/80-80022-15B/topics/classify-objects-with-default-model.md) [Next Topic
Run a sample application using Qualcomm Device Cloud](https://docs.qualcomm.com/bundle/publicresource/80-80022-15B/topics/sample-app-qdc.md)