mocleiri / tensorflow-micropython-examples

A custom micropython firmware integrating tensorflow lite for microcontrollers and ulab to implement the tensorflow micro examples.
MIT License
170 stars 79 forks source link

Using TensorFlow with MicroPython on the Pico??? #75

Closed Raunak-Singh-Inventor closed 2 years ago

Raunak-Singh-Inventor commented 2 years ago

Does this repo currently support using TensorFlow with MicroPython on the Raspberry Pi Pico? If not, is support going to be added in the near future?

mocleiri commented 2 years ago

@Raunak-Singh-Inventor yes there are rp2 build's downloadable from here: https://github.com/mocleiri/tensorflow-micropython-examples/actions/runs/1896970046

Carn you check if your particular pico board is being auto built?

I'd be happy to add your board of it's not already being built.

I'm building using the cmsis accelerated kernels and have run hello world and micro speech on the pico.

Raunak-Singh-Inventor commented 2 years ago

@mocleiri I am using the ArduCam Pico4ML board: https://www.arducam.com/pico4ml-an-rp2040-based-platform-for-tiny-machine-learning. Would it be possible to add builds for this pico board?

mocleiri commented 2 years ago

@Raunak-Singh-Inventor I can't find any board specific pins or setup either at that link or within the pick-sdk for your board. This makes me think that the standard pico build will work.

Can you try and flash microlite-rp2-pico-firmware.

Hello world and micro_speech should work.

At the moment the person detection has only been written for esp32 but it looks like arducam have a micropython driver for the camera: https://github.com/ArduCAM/PICO_SPI_CAM/tree/master/Python

That could be used to replace the camera module in the esp32 example: https://github.com/mocleiri/tensorflow-micropython-examples/blob/main/examples/person_detection/esp32-cam/person_detection_cam.py

Raunak-Singh-Inventor commented 2 years ago

@mocleiri I uploaded the firmware.uf2 to the pico. Now, how do I run the hello_world example?

Raunak-Singh-Inventor commented 2 years ago

Never mind, will check out these instructions https://github.com/mocleiri/tensorflow-micropython-examples/tree/main/examples/hello-world#rp2-port