Apply computer vision algorithms to perform a variety of tasks on input images and video using Vision.

Posts under Vision tag

82 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Is the Apple Neural Scene Analyzer (ANSA) backbone available to devs
Hello, My understanding of the paper below is that iOS ships with a MobileNetv3-based ML model backbone, which then uses different heads for specific tasks in iOS. I understand that this backbone is accessible for various uses through the Vision framework, but I was wondering if it is also accessible for on-device fine-tuning for other purposes. Just as an example, if I want to have a model to detect some unique object in a photo, can I use the built in backbone or do I have to include my own in the app. Thanks very much for any advice and apologies if I didn't understand something correctly. Source: https://machinelearning.apple.com/research/on-device-scene-analysis
1
0
484
Feb ’24
When I enter immersive view, the window keeps getting pushed back.
I'm using RealityKit to give an immersive view of 360 pictures. However, I'm seeing a problem where the window disappears when I enter immersive mode and returns when I rotate my head. Interestingly, putting ".glassBackground()" to the back of the window cures the issue, however I prefer not to use it in the UI's backdrop. How can I deal with this? here is link of Gif:- https://firebasestorage.googleapis.com/v0/b/affirmation-604e2.appspot.com/o/Simulator%20Screen%20Recording%20-%20Apple%20Vision%20Pro%20-%202024-01-30%20at%2011.33.39.gif?alt=media&token=3fab9019-4902-4564-9312-30d49b15ea48
0
0
467
Jan ’24
Is this type of offset even possible with Vision OS?
Hey, I'm working on a UI that a designer created. But he added an object behind the glass, with an offset, pretty much like the cloud in this video: https://dribbble.com/shots/23039991-Weather-Widget-Apple-Vision-Pro-visionOS I tried a couple of methods, but I always ended up clipping my object. So, here's the question: Is there a way to have some object behind the glass panel, but with a slight offset on the x and y?
1
0
357
Jan ’24
Is it possible to create a compass in VisionOS?
I am attempting to create a simple compass for Apple Vision Pro. The method I am familiar with involves using: locationManager.startUpdatingHeading() locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) However, this does not function on visionOS as 'CLHeading is unavailable in visionOS'. Is there any way to develop this simple compass on visionOS?
1
0
362
Jan ’24
Vision Framework - Text Recognition - Cannot recognize some umlaut diacritics
I am using Vision Framework to recognize text in my app. However, some umlaut diacritics are recognized incorrectly, for example: Grudziński (The incorrect result is: Grudzinski). I already changed language to DE (because my app needs to support DE text) and tried to use VNRecognizeTextRequest#customWord with usesLanguageCorrection but the result still is incorrect. Does Apple provide any APIs to solve this problem? This issue also happens when I open the Gallery on my phone, copy text from images, and paste it to another place.
0
0
264
Jan ’24
(Legal-)Restrictions publishing Coin Counter (computer vision)
Hello, I am currently developping an app that counts coins using Computer vision to determine the total value in the picture. However I notice there are no apps in the app store that do anything similar which makes me wonder if there are any restrictions on publishing these types of apps from either apple or governments? I would like to know if it will be possible to launch my app in the European Union once it is finished. Thanks in advance, Guus
0
0
308
Nov ’23
How to attach point cloud(or depth data) to heic?
I'm developing 3D Scanner works on iPad. I'm using AVCapturePhoto and Photogrammetry Session. photoCaptureDelegate is like below: extension PhotoCaptureDelegate: AVCapturePhotoCaptureDelegate { func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) { let fileUrl = CameraViewModel.instance.imageDir!.appendingPathComponent("\(PhotoCaptureDelegate.name)\(id).heic") let img = CIImage(cvPixelBuffer: photo.pixelBuffer!, options: [ .auxiliaryDepth: true, .properties: photo.metadata ]) let depthData = photo.depthData!.converting(toDepthDataType: kCVPixelFormatType_DepthFloat32) let colorSpace = CGColorSpace(name: CGColorSpace.sRGB) let fileData = CIContext().heifRepresentation(of: img, format: .RGBA8, colorSpace: colorSpace!, options: [ .avDepthData: depthData ]) try? fileData!.write(to: fileUrl, options: .atomic) } } But, Photogrammetry session spits warning messages: Sample 0 missing LiDAR point cloud! Sample 1 missing LiDAR point cloud! Sample 2 missing LiDAR point cloud! Sample 3 missing LiDAR point cloud! Sample 4 missing LiDAR point cloud! Sample 5 missing LiDAR point cloud! Sample 6 missing LiDAR point cloud! Sample 7 missing LiDAR point cloud! Sample 8 missing LiDAR point cloud! Sample 9 missing LiDAR point cloud! Sample 10 missing LiDAR point cloud! The session creates a usdz 3d model but scale is not correct. I think the point cloud can help Photogrammetry session to find right scale, but I don't know how to attach point cloud.
0
0
441
Nov ’23
Object recognition and tracking on visionOS
Hello! I would like to develop a visionOS application that tracks a single object in a user's environment. Skimming through the documentation I found out that this feature is currently unsupported in ARKit (we can only recognize images). But it seems it should be doable by combining CoreML and Vision frameworks. So I have a few questions: Is it the best approach or is there a simpler solution? What is the best way to train a CoreML model without access to the device? Will videos recorded by iPhone 15 be enough? Thank you in advance for all the answers.
1
0
548
Nov ’23
iOS Xcode - ABPKPersonIDTracker not supported on this device
I am trying to use Vision framework in iOS but getting below error in logs. Not able to find any resources in Developer Forums. Any help would be appreciated! ABPKPersonIDTracker not supported on this device Failed to initialize ABPK Person ID Tracker public func runHumanBodyPose3DRequest() { let request = VNDetectHumanBodyPose3DRequest() let requestHandler = VNImageRequestHandler(url: filePath!) do { try requestHandler.perform([request]) if let returnedObservation = request.results?.first { self.humanObservation = returnedObservation print(humanObservation) } } catch let error{ print(error.localizedDescription) } }
3
0
542
Nov ’23
SCSensitivityAnalyzer always returns a result of false
hi there, i'm not sure if i'm missing something, but i've tried passing a variety of CGImages into SCSensitivityAnalyzer, incl ones which should be flagged as sensitive, and it always returns false. it doesn't throw an exception, and i have the Sensitive Content Warning enabled in settings (confirmed by checking the analysisPolicy at run time). i've tried both the async and callback versions of analyzeImage. this is with Xcode 15 beta 5. i'm primarily testing on iOS/iPad simulators - is that a known issue? cheers, Mike
1
0
642
Oct ’23
Apple Vision Pro - Showing Error
var accessibilityComponent = AccessibilityComponent() accessibilityComponent.isAccessibilityElement = true accessibilityComponent.traits = [.button, .playsSound] accessibilityComponent.label = "Cloud" accessibilityComponent.value = "Grumpy" cloud.components[AccessibilityComponent.self] = accessibilityComponent // ... var isHappy: Bool { didSet { cloudEntities[id].accessibilityValue = isHappy ? "Happy" : "Grumpy" } }
0
0
549
Sep ’23
compareDistance in Vision not working as expected
Hi, When using VNFeaturePrintObservation and then computing the distance using two images, the values that it returns varies heavily. When two identical images (same image file) is inputted into function (below) that I have used to compare the images, the distance does not return 0 while it is expected to, since they are identical images. Also, what is the upper limit of computeDistance? I am trying to find the percentage similarity between the two images. (Of course, this cannot be done unless the issue above is resolved). Code that I have used is below func featureprintObservationForImage(image: UIImage) -> VNFeaturePrintObservation? {     let requestHandler = VNImageRequestHandler(cgImage: image.cgImage!, options: [:])     let request = VNGenerateImageFeaturePrintRequest()     request.usesCPUOnly = true // Simulator Testing     do {       try requestHandler.perform([request])       return request.results?.first as? VNFeaturePrintObservation     } catch {       print("Vision Error: \(error)")       return nil     }   }   func compare(origImg: UIImage, drawnImg: UIImage) -> Float? {     let oImgObservation = featureprintObservationForImage(image: origImg)     let dImgObservation = featureprintObservationForImage(image: drawnImg)     if let oImgObservation = oImgObservation {       if let dImgObservation = dImgObservation {         var distance: Float = -1         do {           try oImgObservation.computeDistance(&distance, to: dImgObservation)         } catch {           fatalError("Failed to Compute Distance")         }         if distance == -1 {           return nil         } else {           return distance         }       } else {         print("Drawn Image Observation found Nil")       }     } else {       print("Original Image Observation found Nil")     }     return nil   } Thanks for all the help!
4
1
1.9k
Sep ’23
Xcode Beta RC didn't have an option for vision simulator
I just downloaded the latest Xcode beta, Version 15.0 (15A240d) and ran into some issues: On start up, I was not given an option to download the Vision simulator. I cannot create a project targeted at visionOS I cannot build/run a hello world app for Vision. In my previous Xcode-beta (Version 15.0 beta 8 (15A5229m)), there was an option to download the vision simulator, and I can create projects for the visionOS and run the code in the vision simulator. The Xcode file downloaded was named "Xcode" instead of "Xcode-beta". I didn't want to get rid of the exiting Xcode, so I selected Keep Both. Now I have 3 Xcodes in the Applications folder Xcode Xcode copy Xcode-beta That is the only thing I see that might have been different about my install. Hardware: Mac Studio 2022 with M1 Max macOS Ventura 13.5.2 Any idea what I did wrong?
2
0
1.4k
Sep ’23
Interview University Research on Vision Machine Learning
Hello, I am Pieter Bikkel. I study Software Engineering at the HAN, University of Applied Sciences, and I am working on an app that can recognize volleyball actions using Machine Learning. A volleyball coach can put an iPhone on a tripod and analyze a volleyball match. For example, where the ball always lands in the field, how hard the ball is served. I was inspired by this session and wondered if I could interview one of the experts in this field. This would allow me to develop my App even better. I hope you can help me with this.
0
0
387
Sep ’23