Fix person detector model labels

This commit is contained in:
Kwabena W. Agyeman 2022-01-01 15:13:45 -08:00
parent bb1b5948e0
commit 8f880bdb83
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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.