Open goats-9 opened 2 months ago
There is a workaround to build the patch-based inference codebase.
Note: The following steps have to be done after cloning the repo and installing the python packages necessary.
arm_nn_mat_mult_kernel_s8_s16_reordered.c
from the CMSIS library to TinyEngine/src
. Execute the below command from the root of the repo.
cp TinyEngine/third_party/CMSIS/CMSIS/NN/Source/ConvolutionFunctions/arm_nn_mat_mult_kernel_s8_s16_reordered.c TinyEngine/src/kernels/int_forward_op/
tinyengine_function.h
as shown below.
diff --git a/TinyEngine/include/tinyengine_function.h b/TinyEngine/include/tinyengine_function.h
index 55f379c..bb4ed0b 100644
--- a/TinyEngine/include/tinyengine_function.h
+++ b/TinyEngine/include/tinyengine_function.h
@@ -17,6 +17,9 @@
* Target ISA: ARMv7E-M
* -------------------------------------------------------------------- */
+#include "arm_nnfunctions.h" +#include "arm_nnsupportfunctions.h" +
However, on running the code on the board, I am unable to get an inference result (using `mcunet-vww1`), with the network always predicting _No Person_ even when a person is displayed to the camera. I am unsure if these changes are the cause of wrong inference.
@goats-9
Copy arm_nn_mat_mult_kernel_s8_s16_reordered.c from the CMSIS library to TinyEngine/src. Execute the below command from the root of the repo.
Simply renaming the function arm_nn_mat_mult_kernel_s8_s16_reordered
in convolve_1x1_s8.c
to arm_nn_mat_mult_kernel_s8_s16_reordered_8mul
does the trick.
@rahulvigneswaran
Thanks for the reply. We tried renaming the function to both _8mul
and oddch
prefixes already, but inference results did not improve. We believe the issue may be among the following.
examples/vww_patchbased.py
)Nevertheless, I will add these inputs to the workarounds stated above.
@goats-9
Building upon your insights, we've explored additional strategies, yet encountered persistent issues. Here's a summary:
While these adjustments occasionally impact prediction outcomes, the issue of classifying 'person' and 'no person' as the same remains consistent.
I am trying to run the inference tutorial on STM32Cube IDE 1.5.0 as documented in the repo. However, on generating code using the script
examples/vww_patchbased.py
and moving the generated foldercodegen
to the inference project foldertutorial/TinyEngine_vww_tutorial/Src/TinyEngine
, the following errors are seen in the IDE.IDE console output is below.
Do let me know if any other data is required.