google_ml_kit_flutter
google_ml_kit_flutter copied to clipboard
Object Detection and barcode scanner example crashes the app on Android physical device
First of all - hats of for the creators of this plugin. I have the same issue as described here - https://github.com/bharat-biradar/Google-Ml-Kit-plugin/issues/241
I've tried object detection from example and I'm getting OutOfMemoryError error. I assume, according to this - https://github.com/bharat-biradar/Google-Ml-Kit-plugin/tree/master/packages/google_mlkit_object_detection#firebase-dependency-for-remote-models that I don't need firebase, but I have it included anyway. After launch I can see a few 'slides', then the screen freezes and after about 30-90 seconds the app crashes.
Device on which I was tested is pretty weak - Motorola G8 with Android 11. But I've tried on it object detection made with different tensor flow plugin and it works, not so smooth, but it worked. When I downed 'ResolutionPreset' to 'medium' detection works very, very bad - it can't recognize books, milk or watches. The only thing on which it can detect something and paint rectangles was a closet and it was seen as a book.
I have also tried a barcode scanner and it acts similar, but I'm able to see a few more slides before crash. On the other hand face detection works very well.
Log: https://pastebin.com/ZLf7wGug
Flutter doctor:
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\DREAMS_FOLLOWERS\android_projekty_innych\Google-Ml-Kit-plugin-master\packages\google_ml_kit\example> flutter doctor -v [√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.856], locale pl-PL) • Flutter version 3.0.5 at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f1875d570e (5 weeks ago), 2022-07-13 11:24:16 -0700 • Engine revision e85ea0e79c • Dart version 2.17.6 • DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at C:\Users\komputerz\AppData\Local\Android\sdk • Platform android-33, build-tools 33.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) • All Android licenses accepted.
[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.16) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools • Visual Studio Build Tools 2019 version 16.11.32602.291 • Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[√] VS Code • VS Code at C:\Users\komputerz\AppData\Local\Programs\Microsoft VS Code • Flutter extension can be installed from: https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (4 available) • moto g 8 (mobile) • ZY227VWZ4P • android-arm64 • Android 11 (API 30) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.856] • Chrome (web) • chrome • web-javascript • Google Chrome 104.0.5112.81 • Edge (web) • edge • web-javascript • Microsoft Edge 104.0.1293.54
[√] HTTP Host Availability • All required HTTP hosts are available
• No issues found!
Hey, this is probably related to the issue with some specific phisical devices, havin trouble with Camera plugin and resolution presets: https://github.com/bharat-biradar/Google-Ml-Kit-plugin/issues/285