パッケージ、リポジトリ、アプリカテゴリを検索

flutter_vision のカバー
パッケージ詳細v3.0.2

flutter_vision

Yolov5、Yolov8、Yolov11 を管理するためのプラグインで、LiteRT(TensorFlow Lite)に対応しています。Androidでのオブジェクト検出とセグメンテーションをサポート。iOSは開発中。

AndroidiOS
30日間ダウンロード
348
いいね数
116
Pub ポイント
160

パッケージをインストール

flutter pub add flutter_vision

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_vision は、LiteRT(TensorFlow Lite)を介して YOLOv5、YOLOv8、YOLOv11 モデルを使用したオブジェクト検出およびセグメンテーションを可能にする Flutter プラグインです。Android および iOS プラットフォームの両方をサポートしており、コンピュータビジョンタスクに向けた効率的なデバイス内推論を提供します。リアルタイム画像解析をモバイルアプリに統合したい開発者向けに設計されており、機能とパフォーマンスの向上を目指して継続的に開発が進められています。特に、デバイス上で高速かつ正確なオブジェクト認識と位置特定が必要なアプリケーションに特に役立ちます。

用途

  • モバイルアプリにおけるリアルタイムオブジェクト検出
  • 拡張現実のための画像セグメンテーション
  • デバイス内でのOCRおよび視覚分析
  • モバイルベースの監視システム
  • AI駆動の写真タグ付け

主な機能

  • YOLOv5、YOLOv8、YOLOv11 モデルをサポート
  • 最適化されたパフォーマンスのために LiteRT を通じて TensorFlow Lite を使用
  • クロスプラットフォームのAndroidおよびiOS互換性
  • 軽量でモバイルデプロイに適している
  • オブジェクト検出およびセグメンテーションの組み込みサポート

適している対象

  • AIビジョンを活用するモバイルアプリ開発者
  • デバイス内でのコンピュータビジョン機能の開発を行うチーム
  • 低遅延推論を必要とするプロジェクト
  • 最小限のセットアップで Android および iOS をターゲットにする開発者
  • AI駆動のカメラアプリケーションのプロトタイピング

注意事項

  • まだ開発中のままです
  • 利用可能なドキュメントが限られています
  • パフォーマンスはデバイスのハードウェアに依存します
  • モデルのサイズはアプリバンドルサイズに影響する可能性があります
  • iOS の統合には追加の構成が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

flutter_vision

A Flutter plugin for managing Yolov5, Yolov8, and Yolov11 accessing with LiteRT (TensorFlow Lite). Support object detection and segmentation on Android. iOS not updated, working in progress.

Installation

Add flutter_vision as a dependency in your pubspec.yaml file.

Android

In android/app/build.gradle, add the following setting in android block.

    android{
        aaptOptions {
            noCompress 'tflite'
            noCompress 'lite'
        }
    }

iOS

Coming soon ...

Usage

For YoloV5, YoloV8, and YoloV11 MODEL

  1. Create a assets folder and place your labels file and model file in it. In pubspec.yaml add:
  assets:
   - assets/labels.txt
   - assets/yolovx.tflite
  1. Import the library:
import 'package:flutter_vision/flutter_vision.dart';
  1. Initialized the flutter_vision library:
 FlutterVision vision = FlutterVision();
  1. Load the model and labels: modelVersion: yolov5 or yolov8 or yolov8seg or yolo11 or yolov11
await vision.loadYoloModel(
        labels: 'assets/labelss.txt',
        modelPath: 'assets/yolov5n.tflite',
        modelVersion: "yolov5",
        quantization: false,
        numThreads: 1,
        useGpu: false);
For camera live feed
  1. Make your first detection: confThreshold work with yolov5 other case it is omited.

Make use of camera plugin

final result = await vision.yoloOnFrame(
        bytesList: cameraImage.planes.map((plane) => plane.bytes).toList(),
        imageHeight: cameraImage.height,
        imageWidth: cameraImage.width,
        iouThreshold: 0.4,
        confThreshold: 0.4,
        classThreshold: 0.5);
For static image
  1. Make your first detection or segmentation:
final result = await vision.yoloOnImage(
        bytesList: byte,
        imageHeight: image.height,
        imageWidth: image.width,
        iouThreshold: 0.8,
        confThreshold: 0.4,
        classThreshold: 0.7);
  1. Release resources:
await vision.closeYoloModel();

About results

For Yolo v5, v8, or v11 in detection task

result is a List<Map<String,dynamic>> where Map have the following keys:

   Map<String, dynamic>:{
    "box": [x1:left, y1:top, x2:right, y2:bottom, class_confidence]
    "tag": String: detected class
   }

For YoloV8 in segmentation task

result is a List<Map<String,dynamic>> where Map have the following keys:

   Map<String, dynamic>:{
    "box": [x1:left, y1:top, x2:right, y2:bottom, class_confidence]
    "tag": String: detected class
    "polygons": List<Map<String, double>>: [{x:coordx, y:coordy}]
   }

Example

Screenshot_2022-04-08-23-59-05-652_com vladih dni_scanner_example Home Detection Segmentation

Contact

  • For flutter_vision bug reports and feature requests please visit GitHub Issues
  • For direct contact: yurihuallpavargas@gmail.com

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。