vision and object detection
Understanding a Dice Roll with Vision and Object Detection
Pass the frames from the camera to the VNCoreMLRequest so it can make predictions using a VNImageRequestHandler object. The VNImageRequestHandler object handles image resizing and preprocessing as well as post-processing of your model's outputs for every prediction. To pass camera frames to your model, you first need to find the image orientation that corresponds to your device's physical orientation. If the device's orientation changes, the aspect ratio of the images can also change. Because you need to scale the bounding boxes for the detected objects back to your original image, you need to keep track of its size.