All Projects → kashifmin → flutter_tensorflow_lite

kashifmin / flutter_tensorflow_lite

Licence: BSD-3-Clause License
A Flutter plugin to access TensorFlow Lite apis.

Programming Languages

dart
5743 projects
kotlin
9241 projects
swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to flutter tensorflow lite

flutter example
flutter code,flutter-banner,flutter-codekk,flutter-panda,flutter_tab
Stars: ✭ 94 (+25.33%)
Mutual labels:  flutter-plugin
theme mode handler
Flutter widget to change `themeMode` during runtime and persist it across restarts.
Stars: ✭ 28 (-62.67%)
Mutual labels:  flutter-plugin
x5 webview flutter
一个基于腾讯x5引擎的webview flutter插件,简化集成,一行代码打开视频播放,暂时只支持android使用
Stars: ✭ 90 (+20%)
Mutual labels:  flutter-plugin
flutter launch whatsapp
Plugin flutter to launch whatsapp
Stars: ✭ 46 (-38.67%)
Mutual labels:  flutter-plugin
flutter-tunein
Dynamically themed Music Player built with flutter
Stars: ✭ 108 (+44%)
Mutual labels:  flutter-plugin
nativeweb
Build your Own Plugin using (PlatformViews) Demo for Flutter Live 2018 Extended Event - Hyderabad
Stars: ✭ 26 (-65.33%)
Mutual labels:  flutter-plugin
flutter opencv
OpenCV bindings plugin for Flutter apps [work in progress]
Stars: ✭ 81 (+8%)
Mutual labels:  flutter-plugin
flutter paystack
💳 A robust Flutter plugin for making payments via Paystack Payment Gateway. Completely supports Android and iOS
Stars: ✭ 146 (+94.67%)
Mutual labels:  flutter-plugin
pub-scaff
scaff, scaffold generator for Dart and Flutter
Stars: ✭ 27 (-64%)
Mutual labels:  flutter-plugin
qrcode
A flutter plugin for scanning QR codes. Use AVCaptureSession in iOS and zxing in Android.
Stars: ✭ 69 (-8%)
Mutual labels:  flutter-plugin
oscilloscope
A Flutter package that can display an Oscilloscope type graphical display
Stars: ✭ 17 (-77.33%)
Mutual labels:  flutter-plugin
r scan
📷🖨Flutter二维码&条形码扫描插件,支持相机、文件、链接、Uint8List类型扫描
Stars: ✭ 108 (+44%)
Mutual labels:  flutter-plugin
audio manager
A flutter plugin for music playback, including notification handling.
Stars: ✭ 94 (+25.33%)
Mutual labels:  flutter-plugin
flutter-elinux-plugins
Flutter plugins for embedded Linux (eLinux)
Stars: ✭ 21 (-72%)
Mutual labels:  flutter-plugin
A-Complete-Guide-To-Flutter
This repo contains all the small snippets related to Flutter Apps. Most of the projects/apps are deployed on Flutter Web using GitHub Actions CI Pipeline.
Stars: ✭ 70 (-6.67%)
Mutual labels:  flutter-plugin
lang table
lang_table is a dart plugin to generate string files from a source. Use a table to manage all multi-language resources. Inspired by fetch-mobile-localization-from-airtable
Stars: ✭ 17 (-77.33%)
Mutual labels:  flutter-plugin
amap search fluttify
高德地图 搜索组件 Flutter插件
Stars: ✭ 56 (-25.33%)
Mutual labels:  flutter-plugin
iap
Flutter plugin for interacting with iOS StoreKit and Android Billing Library
Stars: ✭ 18 (-76%)
Mutual labels:  flutter-plugin
cross connectivity
A Flutter plugin for handling Connectivity and REAL Connection state in the mobile, web and desktop platforms. Supports iOS, Android, Web, Windows, Linux and macOS.
Stars: ✭ 27 (-64%)
Mutual labels:  flutter-plugin
Flutter-Apps
🌀 This is mainly focus on a complete application for production
Stars: ✭ 18 (-76%)
Mutual labels:  flutter-plugin

tensorflow_lite

pub package

A Flutter plugin to access TensorFlow Lite apis. TensorFlow Lite is TensorFlow’s lightweight solution for mobile and embedded devices. With TensorFlow Lite you can deploy machine learning models on phones in your Android/iOS app.

Usage

Add tensorflow_lite to your pubspec.yaml

Copy your models to an asset dir like assets/mobilenet_quant_v1_224.tflite And add it to your pubspec.yaml

   assets:
     - assets/mobilenet_quant_v1_224.tflite

Import tensorflow_lite in your app

import 'package:tensorflow_lite/tensorflow_lite.dart';

Create a new Interpreter instance based on your tflite model file

Interpreter model = await Interpreter.createInstance(modelFilePath: modelPath);

Pass some bytes to the model to get the output

dynamic result = await _interpreter.run(imageToByteList(image), new Uint8List(_labelList.length));

Image Classification example

tensorflow_lite also includes a wrapper for image classification models which can be easily loaded without much of boilerplate code.

Future<Null> loadRecognitions() async {
    var classifier = await TFLiteImageClassifier.createInstance(
      assets: rootBundle,
      modelPath: "assets/mobilenet_quant_v1_224.tflite",
      labelPath: "assets/labels.txt",
      inputSize: 224,
    );
    print('Classifier ready');
    var imageBytes = (await rootBundle.load("assets/cat500.png")).buffer;
    img.Image image = img.decodePng(imageBytes.asUint8List());
    image = img.copyResize(image, 224, 224);
    _recognitions = await classifier.recognizeImage(image);
    setState(() {});

    await classifier.close();
  }

Please check the example for full usage.

Note

  • Works only on Android
  • Tested only on image classification

Contributing

I am new to Flutter and I haven't worked on iOS yet. So if you are an iOS developer, i'd be glad to receive some contribution. Just send a PR or open up an issue!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].