vladiH / flutter_vision

A Flutter plugin for managing both Yolov5 model and Tesseract v4, accessing with TensorFlow Lite 2.x. Support object detection, segmentation and OCR on both iOS and Android.
https://pub.dev/packages/flutter_vision
MIT License
72 stars 31 forks source link

No "detection" on some phone #36

Open JobiJoba opened 1 year ago

JobiJoba commented 1 year ago

Hi, I've some issue to detect on some specific phone and maybe someone here have an idea why, and how to resolve the issue. I'm doing Live Detection of vehicle with the Camera package + flutter_vision.

Both phone load the GPU delegate correctly (I had to upgrade flutter vision internal package for that - can see here if needed : https://github.com/JobiJoba/flutter_vision )

In this case I'm using a Oppo F11 Pro and here are the "debug print" of the detection:

image

As we can see, the width is 480 and the height 640 (From Camera Preview) and he resize to 640,640 and detect correctly.

Now with an Oppo Reno 7Z (newer phone)

image

the base size is 480,720 and he resize it to 640,640. But here no detection (result at least)

In both case with have a result in model output, but he "can't" translate them into a correct result.

Here is the debug of both model_outputs variable:

image

The F11 pro also had some result on row 14 while Reno 7Z only on 3 first top.


I also tried different libraries:

flutter pytorch: Everything works, but no gpu acceleration so fps quite low ... flutter_tflite: Same issue as here, can't detect anything with their base model (and they don't have yolov8 support).

If someone see something I don't see or an idea on what to look at :)