Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated lite/examples/object_detection/raspberry_pi/utils.py and changed requirements.txt #471

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,5 +1,5 @@
argparse
numpy>=1.20.0 # To ensure compatibility with OpenCV on Raspberry Pi.
opencv-python~=4.5.3.56
tflite-support>=0.4.2
tflite-support==0.4.0
protobuf>=3.18.0,<4
4 changes: 2 additions & 2 deletions lite/examples/object_detection/raspberry_pi/utils.py
Expand Up @@ -45,8 +45,8 @@ def visualize(
cv2.rectangle(image, start_point, end_point, _TEXT_COLOR, 3)

# Draw label and score
category = detection.categories[0]
category_name = category.category_name
category = detection.classes[0]
category_name = category.class_name
probability = round(category.score, 2)
result_text = category_name + ' (' + str(probability) + ')'
text_location = (_MARGIN + bbox.origin_x,
Expand Down