vision-framework

Implement iOS computer vision features using the Swift Vision API.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/DFly7/iOS-FastAPI-Supabase-AI --skill vision-framework-dfly7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vision-framework
Source: https://github.com/DFly7/iOS-FastAPI-Supabase-AI/tree/main/.agents/skills/vision-framework
Command: npx skills add https://github.com/DFly7/iOS-FastAPI-Supabase-AI --skill vision-framework-dfly7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provide a comprehensive, ready-to-use set of patterns and best practices for adding on-device computer vision to iOS apps, removing the friction of integrating OCR, barcode scanning, face detection, segmentation, object tracking, and document scanning across camera and image pipelines.

Core Features & Use Cases

  • Text Recognition (OCR): Accurate and fast text extraction for photos, scanned documents, and live camera feeds with language hints and recognition level tuning.
  • Detection & Tracking: Face rectangles, landmarks, barcode recognition, rectangle/document detection, and stateful object tracking across video frames.
  • Image Segmentation & Core ML: Person and instance segmentation masks, integration patterns for custom Core ML models, and mask composition with Core Image.
  • VisionKit Integration: DataScannerViewController and VNDocumentCameraViewController patterns for live scanning, SwiftUI wrappers, and permission handling.
  • Performance & Safety: Coordinate normalization utilities, threading guidance (avoid main thread), and recommendations for recognition level and resource reuse.

Quick Start

Use the vision-framework skill to extract text, barcodes, and person masks from an example camera frame and return normalized bounding boxes for UI overlay.

Frequently Asked Questions about vision-framework

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text from a live camera feed in an iOS app?

Implement OCR on a live camera feed using VisionKit DataScannerViewController and Vision text recognition requests to extract text from camera frames. You can tune language hints and recognition level for faster processing.

What is the best way to track an object across video frames in Swift?

Stateful object tracking across video frames uses Vision tracking requests to follow detected objects over time. You apply modern async/await Vision APIs or legacy VNRequest fallbacks to process each frame.

Does the Vision framework support barcode scanning and face detection simultaneously?

The Vision framework supports barcode scanning and face detection simultaneously. You can run face rectangle, landmark detection, and barcode recognition requests in parallel across still images and video frames.

Can I use Core ML models for image segmentation with Vision?

Image segmentation with Core ML is supported through Vision framework integration patterns. You can generate person and instance segmentation masks, then compose them with Core Image for custom outputs.

Why does my Vision request block the main thread?

Vision requests block the main thread when executed on the default queue. You must use background threading for Vision request execution and apply coordinate normalization utilities to map results back to UI overlays.

How do I normalize bounding box coordinates from Vision to my UI overlay?

Coordinate normalization utilities convert Vision bounding box coordinates to UI overlay space. You apply these utilities to map normalized Vision coordinates to your SwiftUI or UIKit view dimensions.