Use a custom-trained YOLOv8 LiteRT model
Qualcomm IM SDK reference applications use the YOLOv8 model for object detection. This example explains how to run a custom-trained YOLOv8 variant with the current reference application. To run your own custom-trained YOLOv8 model, complete the following steps:- Replace the existing model with your new model in the reference application.
- Update the label files with your custom labels.
- Run the reference application with the updated model.
Update the label files
The Qualcomm IM SDK reference applications expect labels in JSON format. Update theid, color, and label values for each entry in the labels file.
The format for each label entry is:
Run object detection with the custom model
To run object detection using the LiteRT runtime with your custom model and label files, complete the following steps:1
Set the user environment variable on the host computer
2
Create the artifact directories
3
Copy the model to the device
4
Copy the label file to the device
5
Sign in to the device using SSH
6
Run the object detection application with sample configuration file
/etc/configs/config_detection.json.To stop the application, press Ctrl+C.7
(Optional) Run the object detection application with a custom configuration file
You can use a custom configuration file by specifying its path with If To view the available command-line options, run:Edit the Run the application:
--config-file:--config-file is specified, the application uses that file. Otherwise, it searches for config_detection.json in the following order:To create a user-specific configuration, copy the sample file to the user configuration directory:
config_detection.json configuration fileThe application uses
$HOME/Downloads/qimsdk_samples as its artifact directory. When a relative path or filename is specified, it is resolved against the corresponding subdirectory below. Alternatively, absolute paths are used as provided.
