T04:- Execution of existing model on the target device
Execution of DLC model on Target device
In the last blog , we have seen how we can convert the existing model into DLC. Now ,We will see how we can actually run the dlc file into Target Device.
First, we have run this model on host device itself by using the tool which is given in the SNPE.
We have to use the path of container dlc path and input list path of running on the host.
--container -> It is the dlc file path.
--input_list -> It is the raw_list txt path.
1. First , we have to export the necessary libraries for running it on the Android device.
2. Second , we have to export the necessary executable files on the Android device.
3.Then we have made the necessary folders on the Android device using adb shell , we have made this on Android target using documentation text .
4.We have made the bin file on the Android target for snpe file executables.
5.And then we have made the lib file on the Android target for the snpe Target architecture .
6.After that we have used adb push command for running it on the Android Target.
Prepare assets in the Android device target.
vivek@Ubuntu2:/opt/qcom/aistack/qairt/2.21.0.240401/examples/Models/InceptionV3/scripts$ python show_inceptionv3_classifications.py -i /opt/qcom/aistack/qairt/2.21.0.240401/examples/Models/InceptionV3/data/target_raw_list.txt -o /opt/qcom/aistack/qairt/2.21.0.240401/examples/Models/InceptionV3/tensorflow/output_android -l /opt/qcom/aistack/qairt/2.21.0.240401/examples/Models/InceptionV3/tensorflow/imagenet_slim_labels.txt
Classification results
cropped/notice_sign.raw 0.130224 459 brass
cropped/plastic_cup.raw 0.989595 648 measuring cup
cropped/chairs.raw 0.380808 832 studio couch
cropped/trash_bin.raw 0.719754 413 ashcan
Now to build the Android app for running this ML model Ondevice we have to run these commands.
After running these commands we can execute the following command to build the APK from the command line.
After running this command assembleDebug our APP will be assembled on Android Target.
So this is the result when running on Android Target.
Comments
Post a Comment