From 8f880bdb83a88609618cef61e225aa42d7b4b5ab Mon Sep 17 00:00:00 2001 From: "Kwabena W. Agyeman" Date: Sat, 1 Jan 2022 15:13:45 -0800 Subject: [PATCH] Fix person detector model labels --- .../34-Remote-Control/popular_features_as_the_remote_device.py | 2 +- .../34-Remote-Control/popular_features_as_the_remote_device.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/examples/Arduino/Portenta-H7/34-Remote-Control/popular_features_as_the_remote_device.py b/scripts/examples/Arduino/Portenta-H7/34-Remote-Control/popular_features_as_the_remote_device.py index 500821e68..dca20ca14 100644 --- a/scripts/examples/Arduino/Portenta-H7/34-Remote-Control/popular_features_as_the_remote_device.py +++ b/scripts/examples/Arduino/Portenta-H7/34-Remote-Control/popular_features_as_the_remote_device.py @@ -119,7 +119,7 @@ def person_detection(data): sensor.set_pixformat(sensor.GRAYSCALE) sensor.set_framesize(sensor.QVGA) scores = tf.classify("person_detection", sensor.snapshot())[0].output() - return ['unsure', 'person', 'no_person'][scores.index(max(scores))].encode() + return ['person', 'no_person'][scores.index(max(scores))].encode() # When called returns the payload string for the largest qrcode # within the OpenMV Cam's field-of-view. diff --git a/scripts/examples/OpenMV/34-Remote-Control/popular_features_as_the_remote_device.py b/scripts/examples/OpenMV/34-Remote-Control/popular_features_as_the_remote_device.py index aa163158a..6d7f8d8ce 100644 --- a/scripts/examples/OpenMV/34-Remote-Control/popular_features_as_the_remote_device.py +++ b/scripts/examples/OpenMV/34-Remote-Control/popular_features_as_the_remote_device.py @@ -119,7 +119,7 @@ def person_detection(data): sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) scores = tf.classify("person_detection", sensor.snapshot())[0].output() - return ['unsure', 'person', 'no_person'][scores.index(max(scores))].encode() + return ['person', 'no_person'][scores.index(max(scores))].encode() # When called returns the payload string for the largest qrcode # within the OpenMV Cam's field-of-view.