A plugin for using Apple Vision Framework with Flutter, designed to integrate multiple APIs into one plugin and process multiple analysis requests at once.
Minimum Requirements: iOS: 13.0+, macOS: 15.0+
Warning
[*] Note that this differs from the VisionAPI minimum requirements.
Status: β
Complete
| Vision API | Request | Status | iOS | macOS | description |
|---|---|---|---|---|---|
| Still Image Analysis | Classify Image | β | 13.0+ | 10.15+ | A request to classify an image. |
| Generate Image Feature Print | β | 13.0+ | 10.15+ | An image-based request to generate feature prints from an image. (FeaturePrint β vector image descriptor similar to a word vector) | |
| Image Sequence Analysis | Generate Person Segmentation | β | 15.0+ | 12.0+ | Produces a matte image for a person it finds in the input image. |
| Generate Person Instance Mask | β | 17.0+ | 14.0+ | Produces a mask of individual people it finds in the input image. | |
| Detect Document Segmentation | β | 15.0+ | 12.0+ | Detects rectangular regions that contain text in the input image. | |
| Saliency Analysis | Generate Attention Based Saliency Image | β | 13.0+ | 10.15+ | Produces a heat map that identifies the parts of an image most likely to draw attention. |
| Generate Objectness Based Saliency Image | β | 13.0+ | 10.15+ | Generates a heat map that identifies the parts of an image most likely to represent objects. | |
| Object Tracking | Track Rectangle | *11.0+ | *10.13+ | Tracks movement of a previously identified rectangular object across multiple images or video frames. | |
| Track Object | *11.0+ | *10.13+ | Tracks the movement of a previously identified object across multiple images or video frames. | ||
| Rectangle Detection | Detect Rectangle | β | *11.0+ | *10.13+ | Finds projected rectangular regions in an image. |
| Face and Body Detection | Detect Face Capture Quality | β | 13.0+ | 10.15+ | Produces a floating-point number that represents the capture quality of a face in a photo. |
| Detect Face Landmarks | β | *11.0+ | *10.13+ | Finds facial features like eyes and mouth in an image. | |
| Detect Face Rectangles | β | *11.0+ | *10.13+ | Finds faces within an image. | |
| Detect Human Rectangles | β | 13.0+ | 10.15+ | Finds rectangular regions that contain people in an image. | |
| Body and Hand Pose Detection | Detect Human Body Pose | β | 14.0+ | 11.0+ | Detects a human body pose. |
| Detect Human Hand Pose | β | 14.0+ | 11.0+ | Detects a human hand pose. | |
| 3D Body Pose Detection | Detect Human Body Pose 3D | β | 17.0+ | 14.0+ | Detects points on human bodies in three-dimensional space, relative to the camera. |
| Animal Detection | Recognize Animals | β | 13.0+ | 10.15+ | Recognizes animals in an image. (Now only dogs and cats are supported.) |
| Animal Body Pose Detection | Detect Animal Body Pose | β | 17.0+ | 14.0+ | Detects an animal body pose. |
| Trajectory Detection | Detect Trajectories | β | 14.0+ | 11.0+ | Detects the trajectories of shapes moving along a parabolic path. |
| Contour Detection | Detect Contours | β | 14.0+ | 11.0+ | Detects the contours of the edges of an image. |
| Optical Flow | Generate Optical Flow | β | 14.0+ | 11.0+ | Generates directional change vectors for each pixel in the targeted image. |
| Track Optical Flow | β | 17.0+ | 14.0+ | Determines the direction change of vectors for each pixel from a previous to current image. | |
| Barcode Detection | Detect Barcodes | β | *11.0+ | *10.13+ | Detects barcodes in an image. |
| Text Detection | Detect Text Rectangles | β | *11.0+ | *10.13+ | Finds regions of visible text in an image. |
| Text Recognition | Recognize Text | β | 13.0+ | 10.15+ | Finds and recognizes text in an image. |
| Horizon Detection | Detect Horizon | β | *11.0+ | *10.13+ | Determines the horizon angle in an image. |
| Image Alignment | Translational Image Registration | β | *11.0+ | *10.13+ | Determines the affine transform necessary to align the content of two images. |
| Track Translational Image Registration | β | 17.0+ | 14.0+ | An image analysis request, as a stateful request you track over time, that determines the affine transform necessary to align the content of two images. | |
| Homographic Image Registration | β | *11.0+ | *10.13+ | Determines the perspective warp matrix necessary to align the content of two images. | |
| Track Homographic Image Registration | β | 17.0+ | 14.0+ | An image analysis request, as a stateful request you track over time, that determines the perspective warp matrix necessary to align the content of two images. | |
| Image Background Removal | Generate Foreground Instance Mask | β | 17.0+ | 14.0+ | Generates an instance mask of noticable objects to separate from the background. |
Important
If you have a request, please make an issue.
Add this to your pubspec.yaml:
unified_apple_vision: ^latest// initialize
final vision = UnifiedAppleVision();
// create input image
final input = VisionInputImage(
bytes: image.bytes,
size: image.size,
);
// analyze
vision.analyze(
image: input,
requests: [
// add requests you wish to perform
VisionRecognizeTextRequest(
onResults: (results) {
final observations = results.ofRecognizeTextRequest; // get casted results
// some action
},
onError: (error) {
// handle error
},
),
],
);Contributions are welcome! Please feel free to submit a Pull Request.
If you want to add a new request or observation class, you can use the tools.py script to generate the boilerplate code for you.
python3 tools.py request --name VNDetectRectanglesRequest --ios 11.0 --macos 10.13
python3 tools.py observation --name VNRectangleObservation --extends VNDetectedObjectObservationThis project is licensed under the MIT License - see the LICENSE file for details.