examples
examples copied to clipboard
Updated lite/examples/object_detection/raspberry_pi/utils.py and changed requirements.txt
I tried running the object detection example provided in the examples library of tensorflow lite but it gave me an error (Error 1) that I could not solve no matter what and I found out that the tflite-support 0.4.4 version was deprecated and did not work on raspberry pi 4 b so I downgraded it to 0.4.0
Error 1 (from above paragraph):
But when i did that it still gave me an error (Error 2) so i traced the error back all the way to the utils.py file in the same folder and figured out what the problem was in the code.
Error 2 (from paragraph above):
Problem was as follows:
Incorrect variable names were used in the utils.py file in lite/examples/object_detection/raspberry_pi I changed line 48 from "category = detection.categories[0]" to "category = detection.classes[0]" and line 49 from "category_name = category.category_name" to "category_name = category.class_name"
After making these changes the code worked perfectly on my raspberry pi 4 b
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.