flutter_vision 3.0.1
flutter_vision: ^3.0.1 copied to clipboard
YOLO object detection and instance segmentation for Flutter on Android and iOS (YOLOv5 to YOLO26), powered by LiteRT with CPU, GPU and NPU acceleration.
3.0.1 #
- Shorter package description (pub.dev requires 60 to 180 characters).
3.0.0 #
Complete rewrite. See MIGRATION.md to upgrade from 2.x.
- iOS support (iOS 15+, Swift Package Manager), with the same results as Android.
- New API:
YoloModel.load,detectImage,detectFrame,dispose, typedDetectionresults (Rectbox, label, confidence, polygon) andBoxMapperto draw results on screen. - Several models can be loaded at the same time.
- The model format is detected from the model itself: YOLOv5/v7, v8, v9, v11,
v12 and NMS-free YOLOv10 / YOLO26.
modelVersionis gone. - LiteRT 2.3 (
CompiledModelAPI) with CPU, GPU and NPU acceleration and automatic fallback to CPU. - Correct camera frames on every device: row padding and pixel strides, NV21, YUV420 and BGRA, and a per-frame rotation.
detectImageapplies the EXIF orientation and decodes large photos at the size the model needs (no more out-of-memory errors).- Letterbox resizing (like Ultralytics) instead of stretching, class-aware NMS and correct boxes for non-square models.
- Segmentation outlines are traced in Dart: OpenCV was removed, the native libraries are 16 KB page aligned (Android 15+) and apps are tens of MB smaller.
- Models with int8 inputs/outputs and NCHW inputs are supported.
- No more crashes when a model is closed or replaced during a detection, and no more native memory leaks.
- The plugin no longer adds camera or storage permissions to your app.
- The pub.dev package is about 120 KB: the example models stay on GitHub.
- Requires Flutter 3.41+, Android minSdk 24, iOS 15. On iOS the simulator
needs an Apple Silicon Mac (LiteRT ships arm64 only); see the README for
the
EXCLUDED_ARCHSsetting needed byflutter build ios --simulator. - Fixes reported issues: 16 KB page size (#58), app size (#27, #40), live detection not working on some phones (#34, #36, #37), segmentation crash with empty masks (#39), several models at once (#43), portrait photos (#41), NCHW inputs (#37) and iOS support (#8). Asset loading errors now say what to check (#44, #51). uint8-input models (#42) are still not supported.
- Tested with Flutter 3.47.8: unit tests, and integration tests on an Android 16 emulator and on an iOS simulator (Xcode 26.6).
2.0.0 #
- BREAKING CHANGE: Removed all Tesseract OCR functionality.
- Added support for YOLOv11 (YOLO11).
- Improved tensor shape handling for better model compatibility.
- Enhanced memory management and resource cleanup.
- Better error handling and thread safety.
- Updated to support Gradle 8.x and Dart 3.6.0+.
- Performance optimizations across all models.
- Now support orientation and isAsset parameters
1.1.4 #
- Resolved the YoloV8 output bug and made updates to the latest version. Please find the latest release on the Ultralytics YOLOv8 0.181 GitHub repository.
1.1.3 #
- Release of segmentation feature via YOLOv8.
- Updated example code.
- Updated README.
1.1.2 #
- GPU delegation error has been fixed.
- Coordinate representation of the box in documentation was fixed.
- Switching between models now are supported.
- Added quantization option for more efficient models at the cost of some precision.
1.1.1 #
- Bounding box error has been fixed.
- Confidence scores for Yolov8 has been fixed.
1.1.0 #
- loadOcrModel, ocrOnFrame, and closeOcrModel have been removed. Instead, Yolo and Tesseract operate independently of each other.
- Models no longer returns responseHandler as output. Instead, it returns a List<Map<String, dynamic>>.
- The Tesseract model has been updated to version 5.0.0, resulting in improved accuracy.
- New methods have been added: loadYoloModel, yoloOnFrame, yoloOnImage, closeYoloModel, loadTesseractModel, tesseractOnImage, and closeTesseractModel.
- Support is now available for both Yolov5 and Yolov8.
- Resource management has been improved, and all models now operate in the background.
1.0.0 #
- Methods for Yolov5 now is available
(loadYoloModel, yoloOnFrame, closeYoloModel). - Yolov5 and OCR model now is independent one to each other.
0.0.2 #
bestparameter has been removed.
0.0.1 #
- Initial release.