All Projects → fynnmaarten → flutter_pytorch_mobile

fynnmaarten / flutter_pytorch_mobile

Licence: other
A flutter plugin for pytorch model inference. Supports image models as well as custom models.

Programming Languages

java
68154 projects - #9 most used programming language
dart
5743 projects
Objective-C++
1391 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to flutter pytorch mobile

flutter ume
UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance
Stars: ✭ 1,792 (+3043.86%)
Mutual labels:  flutter-package
stop watch timer
This is Stop Watch Timer for flutter plugin.🏃‍♂️
Stars: ✭ 76 (+33.33%)
Mutual labels:  flutter-package
advance image picker
Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.
Stars: ✭ 91 (+59.65%)
Mutual labels:  flutter-package
glass kit
💎 A package containing widgets to implement glass morphism in flutter apps
Stars: ✭ 50 (-12.28%)
Mutual labels:  flutter-package
flutter paging
A small library support load infinite for ListView - GridView on Flutter.
Stars: ✭ 32 (-43.86%)
Mutual labels:  flutter-package
getwidget-docs
Get Widgets UI library docs.
Stars: ✭ 17 (-70.18%)
Mutual labels:  flutter-package
Flutter-Custom-Carousel
Flutter Custom Carousel Application Design and Animation - day 18
Stars: ✭ 44 (-22.81%)
Mutual labels:  flutter-package
time ago provider
library for generating fuzzy timestamp for example ("9 minutes ago")
Stars: ✭ 16 (-71.93%)
Mutual labels:  flutter-package
syntax highlighter
Syntax Highlighter for Dart/Flutter Code
Stars: ✭ 28 (-50.88%)
Mutual labels:  flutter-package
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+142.11%)
Mutual labels:  flutter-package
flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+1691.23%)
Mutual labels:  flutter-package
barcode.flutter
barcode generate library for Flutter
Stars: ✭ 58 (+1.75%)
Mutual labels:  flutter-package
flutter auth buttons
Auth Buttons is a flutter widget library, include buttons for authenticating with the most popular social networks.
Stars: ✭ 23 (-59.65%)
Mutual labels:  flutter-package
alphabet scroll view
A Scrollable ListView Widget with the dynamic vertical Alphabet List on the Side which you can drag and tap to scroll to the first item starting with that letter in the list.
Stars: ✭ 21 (-63.16%)
Mutual labels:  flutter-package
seo renderer
A Flutter Web Plugin to display Text Widget as Html for SEO purpose
Stars: ✭ 103 (+80.7%)
Mutual labels:  flutter-package
very good infinite list
A Very Good Infinite List Widget created by Very Good Ventures. Great for activity feeds, news feeds, and more. 🦄
Stars: ✭ 109 (+91.23%)
Mutual labels:  flutter-package
bloc
A predictable state management library that helps implement the BLoC design pattern
Stars: ✭ 12 (-78.95%)
Mutual labels:  flutter-package
Free-RASP-Flutter
Flutter library for improving app security and threat monitoring on Android and iOS mobile devices.
Stars: ✭ 62 (+8.77%)
Mutual labels:  flutter-package
loadany
Flutter load more package , support ListView、GridView、Slivers
Stars: ✭ 25 (-56.14%)
Mutual labels:  flutter-package
flutter syntax view
Flutter Syntax Highlighter
Stars: ✭ 88 (+54.39%)
Mutual labels:  flutter-package

pytorch_mobile

A flutter plugin for pytorch model inference, supported both for Android and iOS.

Usage

Installation

To use this plugin, add pytorch_mobile as a dependency in your pubspec.yaml file.

Create a assets folder with your pytorch model and labels if needed. Modify pubspec.yaml accoringly.

assets:
 - assets/models/model.pt
 - assets/labels.csv

Run flutter pub get

Import the library

import 'package:pytorch_mobile/pytorch_mobile.dart';

Load model

Either custom model:

Model customModel = await PyTorchMobile
        .loadModel('assets/models/custom_model.pt');

Or image model:

Model imageModel = await PyTorchMobile
        .loadModel('assets/models/resnet18.pt');

Get custom prediction

List prediction = await customModel
        .getPrediction([1, 2, 3, 4], [1, 2, 2], DType.float32);

Get prediction for an image

String prediction = await _imageModel
        .getImagePrediction(image, 224, 224, "assets/labels/labels.csv");

Image prediction for an image with custom mean and std

final mean = [0.5, 0.5, 0.5];
final std = [0.5, 0.5, 0.5];
String prediction = await _imageModel
        .getImagePrediction(image, 224, 224, "assets/labels/labels.csv", mean: mean, std: std);

Contact

[email protected]

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].