Pakete, Repositories und App-Kategorien suchen

Cover von flutter_vision
Paketdetailsv3.0.2

flutter_vision

Plugin zur Verwaltung von Yolov5, Yolov8 und Yolov11 mit LiteRT (TensorFlow Lite) Unterstützung. Objekterkennung und Segmentierung auf Android. iOS, in Entwicklung.

AndroidiOS
30-Tage-Downloads
348
Likes
116
Pub-Punkte
160

Paket installieren

flutter pub add flutter_vision

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

flutter_vision ist ein Flutter-Plugin, das die Objekterkennung und Segmentierung mithilfe von YOLOv5-, YOLOv8- und YOLOv11-Modellen über LiteRT (TensorFlow Lite) ermöglicht. Es unterstützt sowohl Android als auch iOS und bietet eine effiziente Inferenz direkt auf dem Gerät für Computer-Vision-Aufgaben. Das Plugin ist für Entwickler konzipiert, die Echtzeit-Bildanalyse in mobilen Apps integrieren möchten, und wird kontinuierlich weiterentwickelt, um Funktionalität und Leistung zu verbessern. Es ist besonders nützlich für Anwendungen, die eine schnelle und genaue Objekterkennung und Lokalisierung direkt auf dem Gerät erfordern.

Anwendungsfälle

  • Echtzeit-Objekterkennung in mobilen Apps
  • Bildsegmentierung für erweiterte Realität
  • OCR und visuelle Analyse auf dem Gerät
  • Mobilbasierte Überwachungssysteme
  • KI-gesteuerte Fototagging

Hauptmerkmale

  • Unterstützt YOLOv5-, YOLOv8- und YOLOv11-Modelle
  • Verwendet TensorFlow Lite über LiteRT für optimierte Leistung
  • Plattformübergreifende Kompatibilität mit Android und iOS
  • Leichtgewichtig und geeignet für mobile Bereitstellung
  • Eingebaute Unterstützung für Objekterkennung und Segmentierung

Geeignet für

  • Mobile-App-Entwickler, die mit KI-Vision arbeiten
  • Teams, die On-Gerät-Computer Vision-Funktionen entwickeln
  • Projekte, die eine geringe Latenz bei der Inferenz erfordern
  • Entwickler, die mit minimalem Aufwand Android und iOS ansprechen
  • Prototyping von künstlich-intelligenten Kamera-Anwendungen

Hinweise

  • Weiterhin in aktiver Entwicklung
  • Beschränkte Dokumentation verfügbar
  • Die Leistung hängt von der Gerätehardware ab
  • Die Modellgröße kann die App-Bundle-Größe beeinflussen
  • Die Integration von iOS erfordert möglicherweise zusätzliche Konfiguration

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

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

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.