MNIST and Quick Draw on STM32F429ZI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-01 8:37 AM
Hello Everybody,
I just wanted to share with you two projects I have done with CUBEMX.AI.
ALL networks are trained with TensorFlow 2.0.
Tensoflow2.0 saved networks(Keras Format) receives an error when converting in CUBEMX so I changed some options in python code to make it compatible with CUBEMX.AI.
Links to github:
https://github.com/nimaaghli/STM32AI_MNIST
https://github.com/nimaaghli/STM32AI_QuickDraw
Link to video demonstrations:
- Labels:
-
STM32F4 Series
-
X-CUBE-AI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-05 6:16 PM
I have a same problem. I think maybe CubeMX/Artificial Inteligence is not compatible to Tensorflow 2.0 yet.
Windows 10
CubeMX 5.4
Artificial Inteligence 5.0.0
TensorFlow 2.0(Keras) model is here(very simple).
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
dense_66 (Dense) (None, 40) 680
_________________________________________________________________
dense_67 (Dense) (None, 20) 820
_________________________________________________________________
dense_68 (Dense) (None, 3) 63
=================================================================
Total params: 1,563
Trainable params: 1,563
Non-trainable params: 0
_________________________________________________________________
But I got a INVALID MODEL error when I try "Analyze" on CubeMX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-05 6:38 PM
Hi,
Please add following to each layer. It would fix the problem.
kernel_initializer='random_uniform'
for example :
model.add(tf.keras.layers.Dense(256, activation='relu',kernel_initializer='random_uniform'))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-05 7:03 PM
Hi,
Analyze works!! thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-07 8:25 AM
Hi, I asked a question about how to make predictions. I will see your code to see if I can answer. I want to send the 28x28 image by uart, since I am using a generic plate with an STM32F4VE. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-07 9:33 AM
Hello again. I was seeing the code generated by STM32Cube.AI and generated a code for verification. Is it possible to generate code for prediction? Looking at your code, I see that it is different from the one generated by STM32Cube.AI, could you explain how to generate it? And if you did it manually, could you explain it to me? Greetings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-02-06 10:24 AM
Hi,
I have actually used STM32Cube.AI to generate the files. I do prediction inside app_x-cube-ai.c (generated by CubeAI) using MX_X_CUBE_AI_Process() method. That is where I pass the image information in float values(Pixel values are normizled from 0-255 to 0-1)
