CMSIS-NN CIFAR10 example for STM32F746G-DISCO does not work?
marcin-ch opened this issue · comments
Hello All,
I am following this Image recognition on Arm Cortex-M with CMSIS-NN guide
I have exactly the same hardware:
STM32F746G-DISCO
STM32F4DIS-CAM
the same software installed
Ubuntu 16.04 LTS
Python 2.7.12
Caffe
GNU Tools for Arm Embedded Processors 7-2017-q4-major
and I am able to reproduce all mentioned in the guide steps (including building basic camera app, quantizing the model, converting the model), except the final one! = Deploy transformed model on an Arm Cortex-M processor
The final call is:
#Run this command in cmsisnn_demo folder
mbed compile -m DISCO_F746NG -t GCC_ARM --source . --source ../ML-examples/cmsisnn-cifar10/code/m7 --source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_with_nn/ --source ../CMSIS_5/CMSIS/NN/Include --source ../CMSIS_5/CMSIS/NN/Source --source ../CMSIS_5/CMSIS/DSP/Include --source ../CMSIS_5/CMSIS/DSP/Source --source ../CMSIS_5/CMSIS/Core/Include -j8
The only difference is in
--source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_with_nn/
the original call refers to
--source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_app/
But I have not changed camera_app folder, just used already prepared by ARM folder with camera_with_nn (ARM provides ready-to-go camera apps without NN and with NN, here)
And mbed finishes with info
[mbed] ERROR: "/usr/bin/python" returned error.
(I know, not much descriptive... but I do not see any ERRORs during building, only: multiple definition of
or first defined here
)
So perhaps any known issues reffering to above?
Has anyone tried to complete this guide?
Hints more than welcome.
Not sure if I call it a workaround but finally I have this example running.
I just changed the final call to:
#Run this command in cmsisnn_demo folder
mbed compile -m DISCO_F746NG -t GCC_ARM --source . --source ../ML-examples/cmsisnn-cifar10/code/m7 --source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_with_nn/ --source ../CMSIS_5/CMSIS/NN/Include --source ../CMSIS_5/CMSIS/NN/Source --source ../CMSIS_5/CMSIS/DSP/Include --source ../CMSIS_5/CMSIS/Core/Include -j8
it means I just simply cut this one:
--source ../CMSIS_5/CMSIS/DSP/Source
Hello marcin_ch, I am currently working on this project for my thesis. Please I need help getting it through. Do you have the link to step by step procedures so that I can follow?
Hi @youngolutosin ,
I followed this guide Image recognition on Arm Cortex-M with CMSIS-NN guide as mentioned in my first post here. You can download this guide as PDF file (please see "Download PDF" option).
I have gone through the steps and I was able to Implement the first basic camera example and it worked. I am stucked at check failed:mdb_status == 0 (2 vs.0) No file or directory. I have edited the mean_file and source file but in caffe/exmaples/cifar10 directory, I don't have mean.binaryproto, cifar10_train_lmdb and cifar10_test_lmdb. Please how did you solve the problem? Thank you in advance.
Hi @youngolutosin ,
first of all, make sure you double-checked Troubleshooting guide
And then have a look at issue I created here with the same question as you. Hope that helps.
@youngolutosin ,
yup, model is not very reliable, but they mentioned about it in the guide:
Note: that this model is very easily affected by changes in light conditions, we have chosen it only for simplicity.
And what may be also helpful for you is the keyword: transfer learning
.
In simple words you can use some already existing/trained model for image classification and re-train it using your dataset. It should greatly shorten the amount of time needed to train the model.
Hope that helps and good luck!
@marcin-ch @youngolutosin Hello ! I'm doing the same CMSIS_NN CIFAR10 example ,following the same guide ,but I met some problems.
It seems that you have done it successfully, and I will be very grateful if you offered some help!
here is my _issue,
Hi @youngolutosin @marcin-ch @shell0108 ,
I'm currently working on this project for my thesis as well.
Did you notice a difference when running the model on the board or on a laptop?
When I run accuracy tests using caffe or as a python script on my host machine I'm getting a decent accuracy. But, when I run a similar accuracy test on the board the accuracy is quite low, ~30%.
Hello @marcin-ch
I know this is a very old project for you, but I am trying to figure out this camera for another project and I am having trouble with the stm32 DCMI. I was wondering if you could upload the generated bin file you get when running the lines:
cd cmsisnn_demo/
mbed compile -m DISCO_F746NG -t GCC_ARM --source . --source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_app/
Although my end goal is ML, I really need to figure out how to use the camera first. I would really appreciate any advice or help, thanks!!
where should this .bin
file be located? As you mentioned, it's been a while since I touched this project last time, so I need some guidance.
Is this path below right one?
~/CMSISNN_Webinar/cmsisnn_demo/BUILD/DISCO_F746NG/GCC_ARM
if so, then please see attached, and please notice I have no hardware to check it on my end, so I am sending it AS IS with hope that it is working version.
cmsisnn_demo.zip
Hi @youngolutosin ,
I followed this guide Image recognition on Arm Cortex-M with CMSIS-NN guide as mentioned in my first post here. You can download this guide as PDF file (please see "Download PDF" option).
Can you share your project report, I am working image recognition using cortex processor with cmsis library, can you help me in completing the project, I don't have much knowledge on this topic.
@NarendraKumarMadireddy seems this is the one
Image recognition on Arm Cortex-M with CMSIS-NN.pdf
and Youtube video as well which might be helpful
Image recognition on Arm Cortex-M with CMSIS-NN in 5 steps
Hello All,
I am following this Image recognition on Arm Cortex-M with CMSIS-NN guide
I have exactly the same hardware:
STM32F746G-DISCO STM32F4DIS-CAM
the same software installed
Ubuntu 16.04 LTS Python 2.7.12 Caffe GNU Tools for Arm Embedded Processors 7-2017-q4-major
and I am able to reproduce all mentioned in the guide steps (including building basic camera app, quantizing the model, converting the model), except the final one! = Deploy transformed model on an Arm Cortex-M processor
The final call is:
#Run this command in cmsisnn_demo folder mbed compile -m DISCO_F746NG -t GCC_ARM --source . --source ../ML-examples/cmsisnn-cifar10/code/m7 --source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_with_nn/ --source ../CMSIS_5/CMSIS/NN/Include --source ../CMSIS_5/CMSIS/NN/Source --source ../CMSIS_5/CMSIS/DSP/Include --source ../CMSIS_5/CMSIS/DSP/Source --source ../CMSIS_5/CMSIS/Core/Include -j8
The only difference is in
--source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_with_nn/
the original call refers to
--source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_app/
But I have not changed camera_app folder, just used already prepared by ARM folder with camera_with_nn (ARM provides ready-to-go camera apps without NN and with NN, here)
And mbed finishes with info
[mbed] ERROR: "/usr/bin/python" returned error.
(I know, not much descriptive... but I do not see any ERRORs during building, only:
multiple definition of
orfirst defined here
)So perhaps any known issues reffering to above?
Has anyone tried to complete this guide?Hints more than welcome.
Can you share your project report, I am working on this image recognition using cortex processor with cmsis library, can you help me in completing the project, I don't have much knowledge on this topic.
Can you share the correct detailed step by step process.
Hello marcin_ch, I am currently working on this project for my thesis. Please I need help getting it through. Do you have the link to step by step procedures so that I can follow?
Can you share your project report, I am working image recognition using cortex processor with cmsis library, can you help me in completing the project, I don't have much knowledge on this topic.
Can you share me the step by step procedure please 🥺.
Hi @youngolutosin @marcin-ch @shell0108 ,
I'm currently working on this project for my thesis as well.
Did you notice a difference when running the model on the board or on a laptop?
When I run accuracy tests using caffe or as a python script on my host machine I'm getting a decent accuracy. But, when I run a similar accuracy test on the board the accuracy is quite low, ~30%.
Can you share your project report, I am working image recognition using cortex processor with cmsis library, can you help me in completing the project, I don't have much knowledge on this topic.
Can you share me the step by step procedure 🥺 please
@NarendraKumarMadireddy seems this is the one
Image recognition on Arm Cortex-M with CMSIS-NN.pdf
and Youtube video as well which might be helpful
Image recognition on Arm Cortex-M with CMSIS-NN in 5 steps
Thankyou but can you share me some report or etc , I am new to Linux and caffe
I don’t have access to the project anymore. Please sto spamming.
On Tue, 15. Aug 2023 at 15:31, Narendra Kumar @.***>
wrote:Hi @youngolutosin https://github.com/youngolutosin @marcin-ch
https://github.com/marcin-ch @shell0108 https://github.com/shell0108 ,I'm currently working on this project for my thesis as well.
Did you notice a difference when running the model on the board or on a
laptop?
When I run accuracy tests using caffe or as a python script on my host
machine I'm getting a decent accuracy. But, when I run a similar accuracy
test on the board the accuracy is quite low, ~30%.Can you share your project report, I am working image recognition using
cortex processor with cmsis library, can you help me in completing the
project, I don't have much knowledge on this topic.Can you share me the step by step procedure 🥺 please
—
Reply to this email directly, view it on GitHub
#16 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK2TEGLZGHOMYGE5MLC72TDXVNT37ANCNFSM4HJC4N2A
.
You are receiving this because you were mentioned.Message ID:
@.***>--
Regards,Olutosin Ademola
+37253564286,
DevOps Engineer | ML Engineer
Tallinn, Estonia.
Sorry , thankyou
Last question, do anyone have the windows version tutorial/PDFs/report of this project?