ultralytics_yolo 패키지는 모바일 애플리케이션에 Ultralytics YOLO(You Only Look Once) 컴퓨터 비전 모델을 통합할 수 있도록 해주는 Flutter 플러그인입니다. 개발자는 최적화된 사전 훈련된 YOLO 모델을 사용하여 안드로이드 및 iOS 기기에서 실시간 객체 탐지가 가능합니다. 효율적인 추론을 위해 네이티브 성능을 활용하여 빠르고 정확한 이미지 분석이 필요한 애플리케이션에 적합합니다. 두 플랫폼 모두 지원하므로 Flutter 앱에 고급 시각 기능을 간편하게 배포할 수 있습니다.
Use the default official model or a specific official ID and let the plugin handle download and caching:
final yolo = YOLO(modelPath: YOLO.defaultOfficialModel() ?? 'yolo26n');
Call YOLO.officialModels() to see which official IDs are available on the current platform. Official assets are downloaded on first use and cached in app storage, so the app package does not carry large model files.
Official assets are maintained as GitHub release assets:
The Flutter resolver uses the LiteRT release for Android and the Core ML release for Apple platforms. Every mobile
asset uses a fixed 224 × 224 classification input or 640 × 640 input for every other task. These release tags are
intentionally pinned for reproducible first-use downloads. See the model guide for the official
export matrix, URL patterns, and model properties.
2. Your own exported model
Pass your own exported YOLO model as a local path or Flutter asset path:
final yolo = YOLO(modelPath: 'assets/models/my-finetuned-model.tflite');
If the exported model includes embedded metadata, the plugin infers task and class labels automatically — it reads Ultralytics' appended-ZIP metadata, with a standard TFLite (FlatBuffers) metadata fallback — so drag-and-drop custom models auto-detect. If metadata is missing, pass task explicitly.
final yolo = YOLO(
modelPath: 'assets/models/my-finetuned-model.tflite',
task: YOLOTask.detect,
);
3. Remote model URL
Pass an http or https URL and the plugin will download it into app storage before loading it.
4. Qualcomm NPU models (Android, opt-in)
Android ships with LiteRT (TFLite) and that remains the default — nothing changes for existing apps, and the
QNN support adds zero bytes to your build. Any model path ending in _qnn.onnx (a Qualcomm QNN context binary
exported with yolo export model=yolo26n.pt format=qnn nms=None imgsz=640, or imgsz=224 for classification) is routed to the Hexagon NPU through the ONNX Runtime QNN Execution
Provider instead. With ultralytics>=8.4.142, nms=None selects raw one-to-many outputs for Android-side NMS.
Running QNN models requires a Snapdragon device with a Hexagon HTP (Snapdragon 8 Gen 2 or newer for the official
_v73 assets; _v81 targets Snapdragon 8 Elite Gen 5) and three additions to your app's
android/app/build.gradle:
android {
packagingOptions {
jniLibs {
useLegacyPackaging = true // the Hexagon DSP loader needs real .so files, not APK-mmapped ones
}
}
}
dependencies {
implementation 'com.microsoft.onnxruntime:onnxruntime-android-qnn:1.26.0'
implementation 'com.qualcomm.qti:qnn-runtime:2.46.0' // newer than the AAR's bundled QAIRT; required for the latest Snapdragons
}
final yolo = YOLO(
modelPath: 'https://github.com/ultralytics/yolo-flutter-app/releases/download/v0.6.6/yolo26n_v73_qnn.onnx',
task: YOLOTask.detect,
);
Without the Gradle opt-in, loading a _qnn.onnx model fails with a clear error and TFLite models are unaffected. The bundled example app follows the same opt-in — it ships without the QNN runtime to keep its download small, so build it with ENABLE_QNN=1 (e.g. ENABLE_QNN=1 flutter run --release) to test the NPU path on a device.
See the performance guide for measured CPU/GPU/NPU numbers and tuning notes.
🧭 Official vs. Custom
Use case
Recommended path
Fastest first integration
Official model ID like yolo26n
You trained or exported your own model
Custom asset or local file
You ship different models per customer or environment
Remote URL
You need the plugin to infer task automatically
Any export with metadata
You have an older or stripped export without metadata
Custom model plus explicit task
For official models, start with YOLO.defaultOfficialModel() or YOLO.officialModels(). For custom models, start with the exported file you actually plan to ship.
📥 Using Your Own Model
For custom models, keep the app-side setup minimal.
Android native assets: place .tflite files in android/app/src/main/assets
Flutter assets on Android: place .tflite files in assets/models/
iOS bundle: drag .mlpackage or .mlmodel into ios/Runner.xcworkspace
Flutter assets on iOS: place .mlpackage.zip files in assets/models/
Then point modelPath at that file or asset path.
Official asset maintenance
The Android TFLite release assets are generated by scripts/export-tflite-models.py. The script defines the official YOLO26 task/size matrix, w8a32 export settings (int8 weights, FP32 activations — dynamic-range, so no calibration data is needed), optional one-shot TFLite inference verification, and optional GitHub release upload.
Run it on Linux x86 or macOS with Python ≥3.10:
uv venv --python 3.12 .venv
uv pip install --torch-backend cpu "ultralytics-opencv-headless[export-litert]>=8.4.142"
uv run python scripts/export-tflite-models.py --verify
Use --upload --repo ultralytics/yolo-flutter-app --tag v0.6.6 to replace the existing .tflite assets. Export QNN
with Ultralytics using the same task-specific imgsz. Core ML assets are generated by
../yolo-ios-app/scripts/export-models.py and hosted on the existing iOS v8.3.0 release.
Android inference runs on LiteRT 2.x through an automatic GPU -> CPU accelerator ladder. w8a32 assets are the official download artifacts (the smallest GPU-compatible litert format); the GPU delegate compiles the whole graph on supported devices and otherwise falls back to CPU. GPU coverage still depends on the device driver and graph, so confirm delegate placement on your target hardware (the GPU delegate runs the graph in FP16):
Version 0.4.0 removes the old Dart-side overlay/control layer. Camera detections are rendered natively by YOLOView; Flutter now owns only the surrounding app controls.
Removed 0.3.x API
0.4.0 replacement
YOLOOverlay, YOLOOverlayTheme
Remove these widgets. Use native YOLOView overlays, or consume onResult/YOLO.predict() data.
YOLOControls
Use YOLOShowcase for the full UI, or compose the exported Material widgets directly.
YOLOView.showNativeUI
Use YOLOShowcase for built-in controls; use bare YOLOView when building your own UI.
YOLOView.showOverlays, YOLOView.overlayTheme
No constructor replacement. Camera overlay drawing is native and not themed from Dart.
YOLOViewController.setShowUIControls()
Show/hide your own Flutter controls around YOLOView.
YOLOViewController.setShowOverlays()
Still available: toggles native overlay rendering. capturePhoto(withOverlays: false) only affects captured JPEG output.
🧩 Recommended Patterns
App type
Model loading pattern
Live camera app
YOLOView(modelPath: 'yolo26n')
Photo picker or gallery workflow
YOLO(modelPath: 'yolo26n')
App with your own bundled model
YOLO(modelPath: 'assets/models/custom.tflite')
Cross-platform Core ML + TFLite app
Use platform-appropriate exported assets and let metadata drive task
Ultralytics thrives on community collaboration, and we deeply value your contributions! Whether it's bug fixes, feature enhancements, or documentation improvements, your involvement is crucial. Please review our Contributing Guide for detailed insights on how to participate. We also encourage you to share your feedback through our Survey. A heartfelt thank you 🙏 goes out to all our contributors!
📄 License
Ultralytics offers two licensing options to accommodate diverse needs:
AGPL-3.0 License: Ideal for students, researchers, and enthusiasts passionate about open-source collaboration. This OSI-approved license promotes knowledge sharing and open contribution. See the LICENSE file for details.
Enterprise License: Designed for commercial applications, this license permits seamless integration of Ultralytics software and AI models into commercial products and services, bypassing the open-source requirements of AGPL-3.0. For commercial use cases, please inquire about an Enterprise License.
🔗 Related Resources
Native iOS Development
If you're interested in using YOLO models directly in iOS applications with Swift (without Flutter), check out our dedicated iOS repository:
👉 Ultralytics YOLO iOS App - A native iOS application for real-time detection, instance segmentation, semantic segmentation, depth estimation, classification, pose estimation, and OBB detection with Ultralytics YOLO models.
This repository provides:
Pure Swift implementation for iOS
Direct Core ML integration
Native iOS UI components
Example code for various YOLO tasks
Optimized for iOS performance
[!NOTE]
On iOS this plugin is built on the shared UltralyticsYOLO Swift package (import UltralyticsYOLO) — the same inference core used by the native iOS app — so both stay in sync from a single source of truth. The plugin's iOS sources (ios/ultralytics_yolo/) hold only the Flutter bridge and the camera/view components, and ship for both Swift Package Manager and CocoaPods.
📮 Contact
Encountering issues or have feature requests related to Ultralytics YOLO? Please report them via GitHub Issues. For broader discussions, questions, and community support, join our Discord server!