Post

Replies

Boosts

Views

Activity

Approaching Custom VST GUI Automation: Combining local Vision OCR with the new FoundationModels framework for screen-grounding
Hello everyone, I’m working on a project to automate software controls inside non-standard macOS applications—specifically custom-drawn audio plugins (like the Roland TR-909 VST). The Challenge: These VST interfaces do not expose their buttons, knobs, or dials via the standard macOS Accessibility tree (NSAccessibility / event taps). Because they are custom-rendered, standard automation tools are blind to them. My Current Hybrid Approach: I am combining two of Apple's local machine learning technologies to solve this without sending data to the cloud: Step 1: Text-Based Layout Mapping (Vision Framework) I capture a screenshot of the targeted window using Quartz Window Services and run a local VNRecognizeTextRequest to extract coordinates for all text labels. This works exceptionally well for text buttons like "OPTION" or "ABOUT". Step 2: Contextual & Non-Text Element Interpretation (FoundationModels Framework) For controls that lack text labels (such as blank step sequencer buttons, parameter knobs, or toggle light states), I pass the screenshot as an Attachment into the new local LanguageModelSession. I ask the model to ground coordinates relative to the text landmarks mapped in Step 1. Here is a simplified snippet of how I am feeding the visual context into the local model: import Foundation import FoundationModels import Cocoa func analyzePluginInterface(cgImage: CGImage) async { guard SystemLanguageModel.default.isAvailable else { print("Local model not downloaded or available.") return } let instructions = """ You are a screen-aware assistant. Your job is to locate GUI controls on a custom 1024x802 VST window. """ let session = LanguageModelSession(instructions: instructions) do { let response = try await session.respond { "Look at this screenshot of the VST window." Attachment(cgImage) "Locate the blank step-sequencer buttons located below the instrument channel labels." "What are the center coordinates (X, Y) for the first active step?" } print("Model Grounding Output: \(response.content)") } catch { print("Inference failed: \(error)") } } My Questions for the Community: Performance & Latency: The local LanguageModelSession.respond call takes several seconds to run on device. For real-time DAW automation, this is a bottleneck. Has anyone experimented with using a custom LoRA adapter or a smaller model profile to speed up spatial coordinate inference? Coordinate Stability: Multimodal models can sometimes hallucinate coordinates (bounding box values). What strategies are you using to constrain the model output to precise pixel boundaries on varying display scaling configurations (Retina vs non-Retina)? Alternative Solutions: Are there newer on-device vision APIs (perhaps in CoreML or Vision) that are better suited for bounding-box grounding of abstract graphics (like dials/knobs) than a general language model session? Would love to hear how others are approaching screen-aware GUI interpretation with these new frameworks! Thanks!
0
0
85
Jun ’26
Command line tool for HEIF/HEIC images that can add depth map ?
Hi, I’ve found gpac and mp4box that was mentioned in the HEIF Apple Developer video.. However it only seems to work with converting video to HEIC still images. It’s also very complex. All I need is a tool that can create an HEIC image and add another image to it as a depth buffer. I’ve tried ImageMagick and libeif that has heif-enc but that can’t add the depth buffer. For such a major knew format I feel I must be missing something here ! Any help appreciated.
1
0
859
Feb ’23
HelloPhotogrammetry RealityKit with 3D Fractals ?
Hi, I’m having trouble creating a model from a digitally rendered image, in this case a 3D fractal from Mandelbulber. For a start is this API and example CLI app the most up to date way of doing this ? I also followed these instructions.. Here’s an example of the image I’m using: Overlap is high with only a few degrees between each image, yet I get errors (see below). Any ideas ? Do I need a background behind the object ? Does the util require depth info that the iPhone camera produces ? AFAIK the Apple docs say depth is optional. Cheers. 2023-01-30 10:18:39.924655+0000 HelloPhotogrammetry[4778:261707] ERROR cv3dapi.pg: Internal error codes (1): 4011 2023-01-30 10:18:39.924716+0000 HelloPhotogrammetry[4778:261711] [HelloPhotogrammetry] Progress(request = modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil) = 1.000000 2023-01-30 10:18:39.926344+0000 HelloPhotogrammetry[4778:261707] [Photogrammetry] No SfM map found in native output! 2023-01-30 10:18:39.926389+0000 HelloPhotogrammetry[4778:261707] [Photogrammetry] Reconstruction failure for modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil) 2023-01-30 10:18:39.927370+0000 HelloPhotogrammetry[4778:261707] [Photogrammetry] Got error in completion: reconstructionFailed(RealityFoundation.PhotogrammetrySession.Request.modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil), "Camera alignment failed -- ensure that there is sufficient overlap between the images.") 2023-01-30 10:18:39.928303+0000 HelloPhotogrammetry[4778:261711] [HelloPhotogrammetry] Request modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil) had an error: reconstructionFailed("Camera alignment failed -- ensure that there is sufficient overlap between the images.") 2023-01-30 10:18:39.928961+0000 HelloPhotogrammetry[4778:261711] [HelloPhotogrammetry] Processing is complete! Program ended with exit code: 0
1
0
656
Feb ’23
Approaching Custom VST GUI Automation: Combining local Vision OCR with the new FoundationModels framework for screen-grounding
Hello everyone, I’m working on a project to automate software controls inside non-standard macOS applications—specifically custom-drawn audio plugins (like the Roland TR-909 VST). The Challenge: These VST interfaces do not expose their buttons, knobs, or dials via the standard macOS Accessibility tree (NSAccessibility / event taps). Because they are custom-rendered, standard automation tools are blind to them. My Current Hybrid Approach: I am combining two of Apple's local machine learning technologies to solve this without sending data to the cloud: Step 1: Text-Based Layout Mapping (Vision Framework) I capture a screenshot of the targeted window using Quartz Window Services and run a local VNRecognizeTextRequest to extract coordinates for all text labels. This works exceptionally well for text buttons like "OPTION" or "ABOUT". Step 2: Contextual & Non-Text Element Interpretation (FoundationModels Framework) For controls that lack text labels (such as blank step sequencer buttons, parameter knobs, or toggle light states), I pass the screenshot as an Attachment into the new local LanguageModelSession. I ask the model to ground coordinates relative to the text landmarks mapped in Step 1. Here is a simplified snippet of how I am feeding the visual context into the local model: import Foundation import FoundationModels import Cocoa func analyzePluginInterface(cgImage: CGImage) async { guard SystemLanguageModel.default.isAvailable else { print("Local model not downloaded or available.") return } let instructions = """ You are a screen-aware assistant. Your job is to locate GUI controls on a custom 1024x802 VST window. """ let session = LanguageModelSession(instructions: instructions) do { let response = try await session.respond { "Look at this screenshot of the VST window." Attachment(cgImage) "Locate the blank step-sequencer buttons located below the instrument channel labels." "What are the center coordinates (X, Y) for the first active step?" } print("Model Grounding Output: \(response.content)") } catch { print("Inference failed: \(error)") } } My Questions for the Community: Performance & Latency: The local LanguageModelSession.respond call takes several seconds to run on device. For real-time DAW automation, this is a bottleneck. Has anyone experimented with using a custom LoRA adapter or a smaller model profile to speed up spatial coordinate inference? Coordinate Stability: Multimodal models can sometimes hallucinate coordinates (bounding box values). What strategies are you using to constrain the model output to precise pixel boundaries on varying display scaling configurations (Retina vs non-Retina)? Alternative Solutions: Are there newer on-device vision APIs (perhaps in CoreML or Vision) that are better suited for bounding-box grounding of abstract graphics (like dials/knobs) than a general language model session? Would love to hear how others are approaching screen-aware GUI interpretation with these new frameworks! Thanks!
Replies
0
Boosts
0
Views
85
Activity
Jun ’26
Command line tool for HEIF/HEIC images that can add depth map ?
Hi, I’ve found gpac and mp4box that was mentioned in the HEIF Apple Developer video.. However it only seems to work with converting video to HEIC still images. It’s also very complex. All I need is a tool that can create an HEIC image and add another image to it as a depth buffer. I’ve tried ImageMagick and libeif that has heif-enc but that can’t add the depth buffer. For such a major knew format I feel I must be missing something here ! Any help appreciated.
Replies
1
Boosts
0
Views
859
Activity
Feb ’23
HelloPhotogrammetry RealityKit with 3D Fractals ?
Hi, I’m having trouble creating a model from a digitally rendered image, in this case a 3D fractal from Mandelbulber. For a start is this API and example CLI app the most up to date way of doing this ? I also followed these instructions.. Here’s an example of the image I’m using: Overlap is high with only a few degrees between each image, yet I get errors (see below). Any ideas ? Do I need a background behind the object ? Does the util require depth info that the iPhone camera produces ? AFAIK the Apple docs say depth is optional. Cheers. 2023-01-30 10:18:39.924655+0000 HelloPhotogrammetry[4778:261707] ERROR cv3dapi.pg: Internal error codes (1): 4011 2023-01-30 10:18:39.924716+0000 HelloPhotogrammetry[4778:261711] [HelloPhotogrammetry] Progress(request = modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil) = 1.000000 2023-01-30 10:18:39.926344+0000 HelloPhotogrammetry[4778:261707] [Photogrammetry] No SfM map found in native output! 2023-01-30 10:18:39.926389+0000 HelloPhotogrammetry[4778:261707] [Photogrammetry] Reconstruction failure for modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil) 2023-01-30 10:18:39.927370+0000 HelloPhotogrammetry[4778:261707] [Photogrammetry] Got error in completion: reconstructionFailed(RealityFoundation.PhotogrammetrySession.Request.modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil), "Camera alignment failed -- ensure that there is sufficient overlap between the images.") 2023-01-30 10:18:39.928303+0000 HelloPhotogrammetry[4778:261711] [HelloPhotogrammetry] Request modelFile(url: file:///Users/michaelzfreeman/Temp/output.usdz, detail: RealityFoundation.PhotogrammetrySession.Request.Detail.reduced, geometry: nil) had an error: reconstructionFailed("Camera alignment failed -- ensure that there is sufficient overlap between the images.") 2023-01-30 10:18:39.928961+0000 HelloPhotogrammetry[4778:261711] [HelloPhotogrammetry] Processing is complete! Program ended with exit code: 0
Replies
1
Boosts
0
Views
656
Activity
Feb ’23