diff --git a/lite/examples/object_detection/raspberry_pi/requirements.txt b/lite/examples/object_detection/raspberry_pi/requirements.txt index a0e89164bbf..8d7e632bbf8 100644 --- a/lite/examples/object_detection/raspberry_pi/requirements.txt +++ b/lite/examples/object_detection/raspberry_pi/requirements.txt @@ -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 diff --git a/lite/examples/object_detection/raspberry_pi/utils.py b/lite/examples/object_detection/raspberry_pi/utils.py index 00e2dedb60d..4a24f71efb6 100644 --- a/lite/examples/object_detection/raspberry_pi/utils.py +++ b/lite/examples/object_detection/raspberry_pi/utils.py @@ -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,