Error running example “Deploy Semantic Segmentation Application Using TensorFlow Lite…”
Hi,
I am trying to run the MATLAB example "Deploy Semantic Segmentation Application Using TensorFlow Lite" but encountered errors. The example was opened by
openExample(‘deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample’)
I am using a Raspberry pi 4b, flashed with image mathworks_raspbian_DL_R22.2.0. Everything worked fine (the MEX file was generated on the host computer, and Raspberry pi was connected successfully) until code line 28, when attempting to generate a PIL MEX function:
codegen -config cfg tflite_semantic_predict -args ones(257,257,3,’single’)
where the code returns error messages. The first few lines of the error message reads:
—————————————
Error executing command "touch -c /home/pi/MATLAB_ws/R2024b/C/Users/phn/Documents/MATLAB/Examples/R2024b/deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample/codegen/lib/tflite_semantic_predict/*.*;make -j$(($(nproc)+1)) -Otarget -f tflite_semantic_predict_rtw.mk all MATLAB_WORKSPACE="/home/pi/MATLAB_ws/R2024b" LINUX_TARGET_LIBS_MACRO="" -C /home/pi/MATLAB_ws/R2024b/C/Users/phn/Documents/MATLAB/Examples/R2024b/deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample/codegen/lib/tflite_semantic_predict". Details:
STDERR: In file included from /home/pi/MATLAB_ws/R2024b/C/Program_Files/MATLAB/R2024b/toolbox/tflite_interface/invokeinterpreter/invokeinterpreter.cpp:6:
/home/pi/MATLAB_ws/R2024b/C/Program_Files/MATLAB/R2024b/toolbox/tflite_interface/invokeinterpreter/export/include/invokeinterpreter/invokeinterpreter.hpp:16:10: fatal error: kernels/register.h: No such file or directory
#include "kernels/register.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [tflite_semantic_predict_rtw.mk:382: invokeinterpreter.cpp.o] Error 1
make: *** Waiting for unfinished jobs….
—————————————
The complete error message is attached.
Could anyone let me know how to fix this? Seems that the file kernels/register.h is missing, but I’m not sure how to fix this. Installing kernel headers on Raspberry Pi through "sudo apt install linux-headers-rpi" did not solve the problem.
Thank you!Hi,
I am trying to run the MATLAB example "Deploy Semantic Segmentation Application Using TensorFlow Lite" but encountered errors. The example was opened by
openExample(‘deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample’)
I am using a Raspberry pi 4b, flashed with image mathworks_raspbian_DL_R22.2.0. Everything worked fine (the MEX file was generated on the host computer, and Raspberry pi was connected successfully) until code line 28, when attempting to generate a PIL MEX function:
codegen -config cfg tflite_semantic_predict -args ones(257,257,3,’single’)
where the code returns error messages. The first few lines of the error message reads:
—————————————
Error executing command "touch -c /home/pi/MATLAB_ws/R2024b/C/Users/phn/Documents/MATLAB/Examples/R2024b/deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample/codegen/lib/tflite_semantic_predict/*.*;make -j$(($(nproc)+1)) -Otarget -f tflite_semantic_predict_rtw.mk all MATLAB_WORKSPACE="/home/pi/MATLAB_ws/R2024b" LINUX_TARGET_LIBS_MACRO="" -C /home/pi/MATLAB_ws/R2024b/C/Users/phn/Documents/MATLAB/Examples/R2024b/deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample/codegen/lib/tflite_semantic_predict". Details:
STDERR: In file included from /home/pi/MATLAB_ws/R2024b/C/Program_Files/MATLAB/R2024b/toolbox/tflite_interface/invokeinterpreter/invokeinterpreter.cpp:6:
/home/pi/MATLAB_ws/R2024b/C/Program_Files/MATLAB/R2024b/toolbox/tflite_interface/invokeinterpreter/export/include/invokeinterpreter/invokeinterpreter.hpp:16:10: fatal error: kernels/register.h: No such file or directory
#include "kernels/register.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [tflite_semantic_predict_rtw.mk:382: invokeinterpreter.cpp.o] Error 1
make: *** Waiting for unfinished jobs….
—————————————
The complete error message is attached.
Could anyone let me know how to fix this? Seems that the file kernels/register.h is missing, but I’m not sure how to fix this. Installing kernel headers on Raspberry Pi through "sudo apt install linux-headers-rpi" did not solve the problem.
Thank you! Hi,
I am trying to run the MATLAB example "Deploy Semantic Segmentation Application Using TensorFlow Lite" but encountered errors. The example was opened by
openExample(‘deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample’)
I am using a Raspberry pi 4b, flashed with image mathworks_raspbian_DL_R22.2.0. Everything worked fine (the MEX file was generated on the host computer, and Raspberry pi was connected successfully) until code line 28, when attempting to generate a PIL MEX function:
codegen -config cfg tflite_semantic_predict -args ones(257,257,3,’single’)
where the code returns error messages. The first few lines of the error message reads:
—————————————
Error executing command "touch -c /home/pi/MATLAB_ws/R2024b/C/Users/phn/Documents/MATLAB/Examples/R2024b/deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample/codegen/lib/tflite_semantic_predict/*.*;make -j$(($(nproc)+1)) -Otarget -f tflite_semantic_predict_rtw.mk all MATLAB_WORKSPACE="/home/pi/MATLAB_ws/R2024b" LINUX_TARGET_LIBS_MACRO="" -C /home/pi/MATLAB_ws/R2024b/C/Users/phn/Documents/MATLAB/Examples/R2024b/deeplearning_shared/SemanticSegmentationUsingTFLiteModelOnHostAndRasPiExample/codegen/lib/tflite_semantic_predict". Details:
STDERR: In file included from /home/pi/MATLAB_ws/R2024b/C/Program_Files/MATLAB/R2024b/toolbox/tflite_interface/invokeinterpreter/invokeinterpreter.cpp:6:
/home/pi/MATLAB_ws/R2024b/C/Program_Files/MATLAB/R2024b/toolbox/tflite_interface/invokeinterpreter/export/include/invokeinterpreter/invokeinterpreter.hpp:16:10: fatal error: kernels/register.h: No such file or directory
#include "kernels/register.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [tflite_semantic_predict_rtw.mk:382: invokeinterpreter.cpp.o] Error 1
make: *** Waiting for unfinished jobs….
—————————————
The complete error message is attached.
Could anyone let me know how to fix this? Seems that the file kernels/register.h is missing, but I’m not sure how to fix this. Installing kernel headers on Raspberry Pi through "sudo apt install linux-headers-rpi" did not solve the problem.
Thank you! raspberry pi, semantic segmentation, deploy, tflite MATLAB Answers — New Questions