All Projects → rushio-consulting → Flutter_camera_ml_vision

rushio-consulting / Flutter_camera_ml_vision

Licence: mit
A flutter widget that show the camera stream and allow ML vision recognition on it, it allow you to detect barcodes, labels, text, faces...

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Flutter camera ml vision

Chat app
A flutter chat app built with firestore. It is clone of messenger.User can create stories,chat and search in real time.
Stars: ✭ 493 (+181.71%)
Mutual labels:  firebase, camera
Quagga2
An advanced barcode-scanner written in Javascript and TypeScript - Continuation from https://github.com/serratus/quaggajs
Stars: ✭ 198 (+13.14%)
Mutual labels:  barcode-scanner, camera
Barcodescanner.xf
Barcode Scanner using GoogleVision API for Xamarin Form
Stars: ✭ 82 (-53.14%)
Mutual labels:  barcode-scanner, camera
Firebase Instagram
📸 Instagram clone with Firebase Cloud Firestore, Expo, and React Native 😁😍
Stars: ✭ 389 (+122.29%)
Mutual labels:  firebase, camera
Barcodescanner
🔎 A simple and beautiful barcode scanner.
Stars: ✭ 1,527 (+772.57%)
Mutual labels:  barcode-scanner, camera
Annca
Android library to simplify work with camera for video and photo with using different camera apis.
Stars: ✭ 169 (-3.43%)
Mutual labels:  camera
Space Cloud
Open source Firebase + Heroku to develop, scale and secure serverless apps on Kubernetes
Stars: ✭ 3,323 (+1798.86%)
Mutual labels:  firebase
Pynet Pytorch
Generating RGB photos from RAW image files with PyNET (PyTorch)
Stars: ✭ 169 (-3.43%)
Mutual labels:  camera
Fastbuy App
App to manage the products of the FastBuy Store (built with React Native and Redux).
Stars: ✭ 168 (-4%)
Mutual labels:  camera
App
COVID-19 App
Stars: ✭ 2,079 (+1088%)
Mutual labels:  firebase
Fireward
A concise and readable language for Firestore security rules, similar to Firebase Bolt.
Stars: ✭ 174 (-0.57%)
Mutual labels:  firebase
Firestore Cloud Functions Typescript
Firebase cloud functions in typescript with Firestore. Using a social network as example
Stars: ✭ 171 (-2.29%)
Mutual labels:  firebase
Tiktok Clone
An iOS Tiktok Clone built with Swift(Frontend) and Firebase(Backend)
Stars: ✭ 170 (-2.86%)
Mutual labels:  firebase
Matisse
基于知乎Matisse增强,一行代码实现图片/视频选择,裁剪,微信同款视频录制和拍照,无需权限申请!
Stars: ✭ 174 (-0.57%)
Mutual labels:  camera
Fcm
Firebase Cloud Messaging (FCM) notifications channel for Laravel
Stars: ✭ 169 (-3.43%)
Mutual labels:  firebase
Wildfire
🔥From a little spark may burst a flame.
Stars: ✭ 175 (+0%)
Mutual labels:  firebase
Fireedit
🔥 FireEdit is a real-time text editor which allows programmers work simultaneously.
Stars: ✭ 168 (-4%)
Mutual labels:  firebase
Alcameraviewcontroller
A camera view controller with custom image picker and image cropping.
Stars: ✭ 2,023 (+1056%)
Mutual labels:  camera
Blinkpy
A Python library for the Blink Camera system
Stars: ✭ 174 (-0.57%)
Mutual labels:  camera
Kalibr
The Kalibr visual-inertial calibration toolbox
Stars: ✭ 2,410 (+1277.14%)
Mutual labels:  camera

Flutter Camera Ml Vision

pub package

A Flutter package for iOS and Android to show a preview of the camera and detect things with Firebase ML Vision.

Installation

First, add flutter_camera_ml_vision as a dependency.

...
dependencies:
  flutter:
    sdk: flutter
  flutter_camera_ml_vision: ^2.2.4
...

Configure Firebase

You must also configure Firebase for each platform project: Android and iOS (see the example folder or https://codelabs.developers.google.com/codelabs/flutter-firebase/#4 for step by step details).

iOS

Add two rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Camera Usage Description and a usage description.
  • and one with the key Privacy - Microphone Usage Description and a usage description. Or in text format add the key:
<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSMicrophoneUsageDescription</key>
<string>Can I use the mic please?</string>

If you're using one of the on-device APIs, include the corresponding ML Kit library model in your Podfile. Then run pod update in a terminal within the same directory as your Podfile.

pod 'Firebase/MLVisionBarcodeModel'
pod 'Firebase/MLVisionFaceModel'
pod 'Firebase/MLVisionLabelModel'
pod 'Firebase/MLVisionTextModel'

Android

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

ps: This is due to the dependency on the camera plugin.

If you're using the on-device LabelDetector, include the latest matching ML Kit: Image Labeling dependency in your app-level build.gradle file.

android {
    dependencies {
        // ...

        api 'com.google.firebase:firebase-ml-vision-image-label-model:19.0.0'
    }
}

If you receive compilation errors, try an earlier version of ML Kit: Image Labeling.

Optional but recommended: If you use the on-device API, configure your app to automatically download the ML model to the device after your app is installed from the Play Store. To do so, add the following declaration to your app's AndroidManifest.xml file:

<application ...>
  ...
  <meta-data
    android:name="com.google.firebase.ml.vision.DEPENDENCIES"
    android:value="ocr" />
  <!-- To use multiple models: android:value="ocr,label,barcode,face" -->
</application>

Usage

1. Example with Barcode

CameraMlVision<List<Barcode>>(
  detector: FirebaseVision.instance.barcodeDetector().detectInImage,
  onResult: (List<Barcode> barcodes) {
    if (!mounted || resultSent) {
      return;
    }
    resultSent = true;
    Navigator.of(context).pop<Barcode>(barcodes.first);
  },
)

CameraMlVision is a widget that show the preview of the camera. It take a detector as parameter here we pass the detectInImage method of the BarcodeDetector object. The detector parameter can take all the different FirebaseVision Detector. Here is a list :

FirebaseVision.instance.barcodeDetector().detectInImage
FirebaseVision.instance.cloudLabelDetector().detectInImage
FirebaseVision.instance.faceDetector().processImage
FirebaseVision.instance.labelDetector().detectInImage
FirebaseVision.instance.textRecognizer().processImage

Then when something is detected the onResult callback is called with the data in the parameter of the function.

Exposed functionality from CameraController

We expose some functionality from the CameraController class here a a list of these :

  • value
  • prepareForVideoRecording
  • startVideoRecording
  • stopVideoRecording
  • takePicture

Getting Started

See the example directory for a complete sample app.

Features and bugs

Please file feature requests and bugs at the issue tracker.

Technical Support

For any technical support, don't hesitate to contact us. Find more information in our website

For now, all the issues with the label support mean that they come out of the scope of the following project. So you can contact us as a support.

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