Skip to content

Commit

Permalink
add set model and set labels for image classification and objects det…
Browse files Browse the repository at this point in the history
…ection
  • Loading branch information
dino committed Oct 20, 2021
1 parent e67d990 commit 45f8df8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/gesture_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

def main():
Vilib.camera_start(inverted_flag=True)
Vilib.display(imshow=True,web=True)
Vilib.display(local=True,web=True)
Vilib.gesture_detect_switch(True)

if __name__ == "__main__":
Expand Down
4 changes: 3 additions & 1 deletion examples/image_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

def main():
Vilib.camera_start(inverted_flag=True)
Vilib.display(imshow=True,web=True)
Vilib.display(local=True,web=True)
# Vilib.image_classify_set_model(path='/opt/vilib/mobilenet_v1_0.25_224_quant.tflite')
# Vilib.image_classify_set_labels(path='/opt/vilib/labels_mobilenet_quant_v1_224.txt')
Vilib.image_classify_switch(True)

if __name__ == "__main__":
Expand Down
2 changes: 2 additions & 0 deletions examples/objects_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
def main():
Vilib.camera_start(inverted_flag=True)
Vilib.display()
# Vilib.object_detect_set_model(path='/opt/vilib/detect.tflite')
# Vilib.object_detect_set_labels(path='/opt/vilib/coco_labels.txt')
Vilib.object_detect_switch(True)

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion examples/pose_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def main():

Vilib.camera_start(inverted_flag=True)
Vilib.display(imshow=True,web=True)
Vilib.display(local=True,web=True)
Vilib.pose_detect_switch(True)

if __name__ == "__main__":
Expand Down

0 comments on commit 45f8df8

Please sign in to comment.