diff --git a/src/viam/services/vision/vision.py b/src/viam/services/vision/vision.py index 6a3c65233..d0902d63e 100644 --- a/src/viam/services/vision/vision.py +++ b/src/viam/services/vision/vision.py @@ -168,7 +168,8 @@ async def get_detections( my_detector = VisionClient.from_robot(robot=machine, "my_detector") # Get an image from the camera - img = await my_camera.get_image() + images, _ = await my_camera.get_images() + img = images[0] # Get detections for that image detections = await my_detector.get_detections(img) @@ -235,7 +236,8 @@ async def get_classifications( my_classifier = VisionClient.from_robot(robot=machine, "my_classifier") # Get an image from the camera - img = await my_camera.get_image() + images, _ = await my_camera.get_images() + img = images[0] # Get the 2 classifications with the highest confidence scores for the image classifications = await my_classifier.get_classifications(img, 2)