tensorflow / tflite-micro

Infrastructure to enable deployment of ML models to low-power resource-constrained embedded targets (including microcontrollers and digital signal processors).
Apache License 2.0
1.91k stars 820 forks source link

Porting to other boards. #2229

Closed hpssjellis closed 1 year ago

hpssjellis commented 1 year ago

Hi: @advaitjain @mansnils @rascani @rkuester

I would like to port this code to a few other boards like I did 3 years ago here. Most of the boards are Arduino: the PortentaH7, Nano33BleSense REV2, Nicla boards, but I am also interested in the Seeedstudio XIAO boards and also testing Coral-Micro on the Arduino IDE (which presently has serial read issues) . I do see the Tensorflow github https://github.com/tensorflow/tflite-micro-arduino-examples which I have replied to in this issue General arduino port of TFLite-micro?

Just wondering who are the leads on the tflite-micro-arduino-examples? Is it still active? If so are you interested in any PR's?

In the past I have had a good relationship with Google when they helped me with my massive list of Rocksetta TensorflowJS single webpage ML examples.

hpssjellis commented 1 year ago

https://github.com/tensorflow/tflite-micro/issues/2207

@advaitjain I would like to work on this porting to other arduino boards , do you have any suggestions

ddavis-2015 commented 1 year ago

@hpssjellis

Thank you for your interest in TFLM. The tflite-micro-arduino-examples repository is up to date as of March of 2023. Syncing of this repo with the TFLM repository has been suspended.

If you would like to add additional board support within your own repository, the src/peripherals/peripherals.h file is the correct starting point. For an example of multi-board support you can look at the peripherals.h file in this repo branch: https://github.com/ddavis-2015/tflite-micro-arduino-examples/tree/teensy-audio

Please feel free to reopen this issue should you have further comments.

Reference issues: #2207

hpssjellis commented 1 year ago

@ddavis-2015 thanks for replying and that does help a bit (I am most interested in the PortentaH7, and NiclaVision) , but if the Arduino tFlite micro repo is not being supported by Google I might as well use my awesome 3 year old tflite micro version here.

Is there a way we can work with Google to keep supporting the Arduino Library? I have also been using the CoralMicro dev board and it has an Arduino port which is not working very well yet, see issue 72 here . Can these two Arduino issues be made into one issue? Could the CoralMicro repo be fixed and adapted to work with other boards? I could help test the CoralMicro on the Arduino IDE with my massive Arduino examples library the portenta-pro-community-solutions here

I would be willing to work on both issues to try to improve Arduino IDE support by Google.

rascani commented 1 year ago

Hi @hpssjellis. The Arduino library was originally frozen due to incompatibilities between the Arduino GCC compiler and the CMSIS NN library. If you're interested in pursuing this, I'm happy to help advise and review/approve PRs, but we don't currently have the bandwidth to actively maintain it.

I can't speak to the CoralMicro project, though my understanding is they're also on an old port of TFLM.

hpssjellis commented 1 year ago

Hi @hpssjellis. The Arduino library was originally frozen due to incompatibilities between the Arduino GCC compiler and the CMSIS NN library. If you're interested in pursuing this, I'm happy to help advise and review/approve PRs, but we don't currently have the bandwidth to actively maintain it.

I can't speak to the CoralMicro project, though my understanding is they're also on an old port of TFLM.

Thanks for the reply @rascani, really interesting that CoralMicro might be using the old port. As far as the CMSIS NN library I feel that edgeimpulse.com has solved that problem so I am curious what might need to be done.

@rascani are you familiar with TensorflowJS, and Arduino microcontrollers? I am in the process of merging the two concepts and can do it with a 3 year old TFLM Arduino port but it would be much better to use a new TFLM Arduino Port.

I teach High School Robotics and do a lot of projects: https://github.com/hpssjellis