Questions tagged [apple-vision]

Apple Vision is a high-level computer vision framework to identify faces, detect and track features, and classify images, video, tabular data, audio and motion sensors data.

Apple Vision framework performs face and face landmark detection on input images and video, barcode recognition, image registration, text detection, and, of course, feature tracking. Vision API allows the use of custom CoreML models for tasks like classification or object detection.

205 questions
3
votes
0 answers

CoreML network output not even close to correct output

I am using a Keras network that uses an input image of 128x128 pixels, this network got an accuracy of more than 85% on the chars74K dataset. When I converted this network to a CoreML model the results are always 100% certain but always wrong, never…
Thijs van der Heijden
  • 1,147
  • 1
  • 10
  • 25
3
votes
1 answer

New Apple Vision API VNTranslationalImageRegistrationRequest

I am trying to play with the Image Alignment Analysis part of the new Vision API but i am struggling with the initialisation of VNTranslationalImageRegistrationRequest. My code is as follows: import UIKit import Vision class ImageTranslation { …
Wrumble
  • 231
  • 1
  • 5
  • 15
3
votes
2 answers

Any limits for source image size with Google Mobile Vision for iOS?

I have some issue while using GoogleMobileVision for iOS. With UIImagePickerController set like this UIImagePickerController* picker = [[UIImagePickerController alloc]init]; picker.delegate = self; picker.sourceType =…
2
votes
0 answers

iOS 16 breaks the VNDetectFaceRectanglesRequest face tracking

First of all let me say that I confirmed that this behavior only happens on iOS 16, and does not happen on the previous iOS versions. In short, the app uses Apple Vision Framework to track face rectangles in the camera input and show that in camera…
deltakroneker
  • 541
  • 1
  • 4
  • 16
2
votes
1 answer

iOS Vision: Drawing Detected Rectangles on Live Camera Preview Works on iPhone But Not on iPad

I'm using the iOS Vision framework to detect rectangles in real-time with the camera on an iPhone and it works well. The live preview displays a moving yellow rectangle around the detected shape. However, when the same code is run on an iPad, the…
lepapillon
  • 55
  • 5
2
votes
1 answer

What do the values in a CVPixelBuffer mean that is returned from a VNGeneratePersonSegmentationRequest?

I use Apple's Vision Framework to create a matte image for a person that is found in a user provided image. I want to analyze the results from a VNGeneratePersonSegmentationRequest to understand, for example, if the request has found a person at all…
Theo
  • 3,826
  • 30
  • 59
2
votes
0 answers

Wrong Vision Framework Landmarks Coordinates

I'm trying to capture face landmarks with Vision Framework to show them on screen, but the eyes always appear a little higher than expected, like the Tim Cook image below. Here is my capturing code: guard let pixelBuffer =…
2
votes
0 answers

How to free memory from VNGeneratePersonSegmentationRequest

I’m playing with the new VNGeneratePersonSegmentationRequest Vision API to make a simple background removal filter I made a small project to test it, works great, but I’m running into issues with memory. After executing the request the app’s memory…
Ebarella
  • 223
  • 1
  • 3
  • 9
2
votes
1 answer

iOS Vision framework with only ARKit import

I hope it's not a silly question, but why this iOS Swift code compiles successfully? import UIKit import ARKit class ViewController: UIViewController { private let sequenceHandler = VNSequenceRequestHandler() override func…
Mattia Ducci
  • 412
  • 6
  • 10
2
votes
1 answer

Can VNImageRequestHandler accepts MLMultiArray as an input? (Without converting to UIImage)

I have two MLModels in my app. The first one is generating an MLMultiArray output which is meant to be used as the second model input. As I'm trying to make things as performance-best as possible. I was thinking about using VNImageRequestHandler to…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
2
votes
0 answers

Apple Vision API: VNRecognizeTextRequest gives garbage output on Big Sur for large image but works fine on Catalina

I have had an OCR app on the MacOS App Store using Vision API's VNRecognizeTextRequest. It works fine on this very long image in Catalina. But on Big Sur, it gives garbage output. I have been able to reproduce it with the below code which is very…
2
votes
1 answer

Vision framework to detect face looking up/down

i’m using Vision framework to detect face orientation. VNFaceObservation has roll and yaw properties but unfortunately no pitch. How can i calculate pitch value? i need to check if a person looking up or down. Someone in another forums suggested me…
2
votes
1 answer

ObjectDetection: Output different from CreateML vs programatically

I want to extract known objects from an image. I created a ObjectDetector model using CreateML App. When I test with CreateML preview the detection works perfectly fine however via code, something seems to be wrong. Below is the sample code section…
Gana
  • 979
  • 3
  • 10
  • 18
2
votes
1 answer

RealityKit and Vision – How to call RayCast API

This question is also asked in the Apple Forum but so far, I have not seen any response there. The question is really, after finding the point of interested from a frame in ARSession. How to convert that into 3D world coordinate. How did I got a…
2
votes
1 answer

Apple Vision – Is it possible to obtain camera position from static image?

Let's say I have a single photo (taken with iOS camera) that contains a known image target (e.g. a square QR code that is 5cm x 5cm) lying on a flat plane. can I use the Apple Vision framework to calculate the 6dof pose of the image target? I'm…
Adrian Taylor
  • 544
  • 1
  • 5
  • 14