NOT TESTED ON RPI5
Use Tensorflow Machine Learning to detect objects:
Note: this works best on plain backdrops
(based on these instructions) https://github.com/tensorflow/examples/tree/master/lite/examples/object_detection/raspberry_pi
Make sure you have a camera attached to your pi.
In the terminal, install Tensorflow Lite :
$ python3 -m pip install tflite-runtime
Clone the Tensorflow examples:
$ git clone https://github.com/tensorflow/examples --depth 1
Navigate into the examples folder
$ cd examples/lite/examples/object_detection/raspberry_pi
Run this script to install the required dependencies and download the TFLite models.
$ sh setup.sh
Downgrade one module to work with our Raspberry Pi OS:
$ python -m pip install --upgrade tflite-support==0.4.2
Run the example:
$ python3 detect.py \
--model efficientdet_lite0.tflite
There are more Tensorflow examples you can run!
Look inside pi/examples/lite/examples
(Not all will so easily work on the Raspberry Pi)
Repeat step 4 and 5 above for any example you want to try
Try: pose_estimation