2025-02-04 10:14 AM - edited 2025-02-04 10:15 AM
I'm trying to convert the BirdNET-Analyzer (https://github.com/kahst/BirdNET-Analyzer/tree/main) model to run on a STM32U5A5. However, both the TFLite and STM32Cube.AI MCU Runtime fail.
The TFLite runtime fails with:
Operator REDUCE_MIN not supported
The STM32Cube.AI MCU Runtime fails with:
INTERNAL ERROR: Invalid size_splits configuration: [1 1 0]
As I'm by no means a ML expert, I was wondering how to fix these conversion issues. I've tried to convert the TF SavedModel (.pb) to a .tflite model with the TFLiteConverter in python with the following enabled:
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS]
However, this gives no warning and converts the model with a REDUCE_MIN operation. I haven't been able to find any information to mitigate the STM32Cube.AI MCU error.
I'm on the latest STM32Cube.AI package in CubeIDE (v10.0.0) and Tensorflow V2.18.0.
Any help is very appreciated!
Solved! Go to Solution.
2025-02-05 06:38 AM
Hello @JSGraaf,
This INTERNAL ERROR: Invalid size_splits configuration: [1 1 0] is due to the last element of size 0. The split is splitting your input into 2 element of size1 and one of size 0. Which is causing the issue.
If you manage to solve this, the model should pass through STM32CubeAI.
That being said, I took a look at the github repository and I saw this:
0.826 GFLOPs, 50.5 MB as FP32
I am pretty sure that this will never run even on a STM32U5A5 or even on STM32H7.
Maybe on a STM32N6 but even for this, I a not sure...
I don't know what kind of project you exactly want to try, but as it seems related to classifying sound, you may be interested by our ST model zoo that provide models and script to retrain these model on your datasets:
https://github.com/STMicroelectronics/stm32ai-modelzoo
In particular, audio even detection.
Have a good day,
Julian
2025-02-05 06:38 AM
Hello @JSGraaf,
This INTERNAL ERROR: Invalid size_splits configuration: [1 1 0] is due to the last element of size 0. The split is splitting your input into 2 element of size1 and one of size 0. Which is causing the issue.
If you manage to solve this, the model should pass through STM32CubeAI.
That being said, I took a look at the github repository and I saw this:
0.826 GFLOPs, 50.5 MB as FP32
I am pretty sure that this will never run even on a STM32U5A5 or even on STM32H7.
Maybe on a STM32N6 but even for this, I a not sure...
I don't know what kind of project you exactly want to try, but as it seems related to classifying sound, you may be interested by our ST model zoo that provide models and script to retrain these model on your datasets:
https://github.com/STMicroelectronics/stm32ai-modelzoo
In particular, audio even detection.
Have a good day,
Julian
2025-02-06 01:23 AM
Thank you for looking into this! I'm going to look into training my own model based on your ai-modelzoo.