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
1
vote
0 answers

Customize iOS Vision text-detection for other objects and typefaces

I'm looking around for different solutions to a problem I'm having and right now I'm looking into the iOS Vision api. Does anyone know if it's possible to use the text/feature detection methods provided by Vision for custom objects in an image, or…
Axel
  • 463
  • 6
  • 19
1
vote
2 answers

Why is Face detection only working with CGImagePropertyOrientation.right?

I've created the Xcode project available on the link below in order to explore the new Vision Framework released by Apple with Xcode9. It is based of adjustments made on codes I've found both on GitHub and Youtube, but I can't understand why the…
Andre Guerra
  • 1,117
  • 1
  • 9
  • 18
1
vote
0 answers

Detecting text with ARSKView and Vision

I have a view controller with an ARSKView whose ARSession I configure like this: let configuration = ARWorldTrackingSessionConfiguration() arskView.session.run(configuration) In its associated SKScene I have this method implementation: override…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
1
vote
3 answers

QR Reader with VNDetectBarcodeRequest

I've setup an AVCaptureSession with a video data output and am attempting to use iOS 11's Vision framework to read QR codes. The camera is setup like basically any AVCaptureSession is. I will abbreviate and just show setting up the output. let…
keithbhunter
  • 12,258
  • 4
  • 33
  • 58
1
vote
1 answer

Combine two images with CGAffineTransform

I am using the new Apple Vision API's VNImageTranslationAlignmentObservation to get a CGAffineTransform returned. The idea is that you pass it two images that can be merged together and it returns the CGAffineTransform so that you can do so. I have…
Wazza
  • 1,725
  • 2
  • 17
  • 49
1
vote
1 answer

Track faces in Local video using Vision framework

I am trying to detect faces in local recorded video using Vision framework. Most of samples provided are detecting faces in Live cam video. How to do face detection in Local video and place a rectangle in detected face in runtime using…
Sravan
  • 41
  • 1
  • 5
0
votes
0 answers

Why does VNGenerateOpticalFlowRequest produce an error while running on Simulator?

I'm trying to use the Vision framework on iOS. In particular, I'm using VNGenerateOpticalFlowRequest as shown in WWDC 2020. I have the following Swift code in my app, which I'm running on an iPhone 14 in Simulator (with XCode 14.3.1): // …
Patrick
  • 11
  • 3
0
votes
0 answers

Swift - Detect Columns in a PDF Page

I am trying to find the coordinates of structured column text in a PDF (single or multi-page) and to give the user visual feedback, I am creating a red rectangle over that text. Currently, I have tried using the Vision framework in order to perform…
kittonian
  • 1,020
  • 10
  • 22
0
votes
0 answers

Loading Core ML Model in Swift

I am trying to make an app playground that will classify a photo as Apple or Orange. I have a model file called "AppleOrange.mlmodel" that is trained for this. But I cannot load the model file. My code: func classifyImage(imageName: String,…
user21587399
0
votes
0 answers

libc++abi.dylib: terminating with uncaught exception of type NSException while using upperBodyOnly for VNdetectHumanRectanglesRequest

I am trying to run VNDetectHumanRectanglesRequest from apple developer Vision library The error is rising when i request.upperBodyOnly = false let requestHandler = VNImageRequestHandler(cgImage: image, orientation: orientation, options: [:]) let…
Akhil Ashref
  • 126
  • 2
  • 4
0
votes
1 answer

How to convert VNRectangleObservation item to UIImage in SwiftUI

I was able to identify squares from a images using VNDetectRectanglesRequest. Now I want those rectangles to store as separate images (UIImage or cgImage). Below is what I tried. let rectanglesDetection = VNDetectRectanglesRequest { request,…
AnujAroshA
  • 4,623
  • 8
  • 56
  • 99
0
votes
0 answers

How to detect hand gesture continuously using Apple Vision?

I’m currently working on a AR project where it can detect my hand OPEN and CLOSE using CoreML model. Currently when it first detected me opening my hand and it would detect it again ONLY when I move my hand out of the camera and move back into the…
0
votes
0 answers

Apple Vision VNDetectRectanglesRequest Returns Rectangles Not Tightly Fitting Detected Rectangle

I am in the process of writing an algorithm to carve out rectangular shapes for processing in iOS by using Apple's Vision Framework. The VNDetectRectangles seems to mostly work and it does accurately detect the shapes in question, but the four…
0
votes
1 answer

Image Recognition Results are not printed in Swift Playgrounds

So I have been working on playground to recognize object in live capture but when I try to print the results, the results are not printed. Here is my code. I have also tried running step through my code and it just executes return in the guard let…
0
votes
1 answer

Swift UIImage .jpegData() and .pngData() changes image size

I am using Swift's Vision Framework for Deep Learning and want to upload the input image to backend using REST API - for which I am converting my UIImage to MultipartFormData using jpegData() and pngData() function that swift natively offers. I use…
Madhav Thakker
  • 107
  • 1
  • 10