How to add additional files while creating a MATLAB standalone Application?
2 views (last 30 days)
Show older comments
Hi i am working in image classification by using Predesigned Deep Learning Architecture Like VGG16,VGG19....etc.i have saved the deeplearning Model in ONNX(Open Neural Network Exchange) format. i have designed an GUI in Matlab for this Classification. In this GUI these ONNX files work well for classification . But while i created a standalone application by using Application Compiler this classification GUI is not working properly even though i have included the support package for ONNX files while packaging. Hereby i am attaching the error thrown away by the software while packaging.the error thrown by MATLAB software are shown below
Compiler version: 8.2 (R2021a)
Analyzing file dependencies.
Warning: In "C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\nnet\supportpackages\onnx\+matlab\+addons\+internal\ONNXPackageInfo.m", "matlabshared.supportpkg.getSupportPackageRoot" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
Warning: In "C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\nnet\supportpackages\onnx\+nnet\+internal\+cnn\+onnx\+util\addSpkgBinPath.m", "matlabshared.supportpkg.getSupportPackageRoot" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
Parsing file "D:\MachineandDeep\DeepLearning\DEEP LEARNING APP\Deep Learning\Testdeeplearning.mlapp"
(referenced from command line).
Generating file "D:\MachineandDeep\DeepLearning\DEEP LEARNING APP\Deep Learning\deeplearning\for_testing\readme.txt".
Packaging...
Creating the bundle...
Creating the install agent URL file...
Web based installer created at D:\MachineandDeep\DeepLearning\DEEP LEARNING APP\Deep Learning\deeplearning\for_redistribution\MyAppInstaller_web.exe.
Packaging complete.
Elapsed packaging time was: 59 seconds.
0 Comments
Answers (1)
Aniket
on 11 Oct 2024
I understand that you are using a predefined DL architecture and trying to save it in ONNX format using a standalone application.
The warnings that you are facing during compilation are because the "exportONNXNetwork" function used to determine support package root in C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\nnet\supportpackages\onnx\+nnet\+internal\+cnn\+onnx\+util\addSpkgBinPath.m is not supported for deployment.
As a workaround, please try the following:
1. Update the file addSpkgBinPath.m by replacing line 7 with
if isempty(pathSet) && ~isdeployed
This makes sure the function "matlabshared.supportpkg.getSupportPackageRoot " is not called when deployed.
2. Use the following command to create the executable.
>> mcc -m Testdeeplearning.mlapp -a C:\ProgramData\MATLAB\SupportPackages\R2021a\toolbox\nnet\supportpackages\onnx -a C:\ProgramData\MATLAB\SupportPackages\R2021a\resources\nnet_cnn_onnx -a C:\ProgramData\MATLAB\SupportPackages\R2021a\bin\win64
Kindly refer to below documentation to know more about managing support packages:
I hope this helps resolve the issue!
0 Comments
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!