Open kalpeshTOPS opened 1 month ago
Can you share your pubspec.yaml
file that contains tflite
?
here is attached file.
here is attached file.
Thanks.
I see that you haven't added the assets
for your model and library. Could you please include them as outlined in the README.md
file?
You can link the library like this.
tflite:
git:
url: https://github.com/sumn2u/flutter_tflite.git
ref: main
I added an example application in the repo for reference.
Thanks.
I am able to load model success fully but i got android app crash while object detection.
i tried below code variation to detect object from live stream
1) var detector = await Tflite.detectObjectOnFrame( bytesList: image.planes.map((plane) { return plane.bytes; }).toList(), model: "YOLO", imageHeight: image.height, imageWidth: image.width, imageMean: 0, imageStd: 255, numResultsPerClass: 1, threshold: 0.3, );
2) var detector = await Tflite.runModelOnFrame( bytesList: image.planes.map((plane) { return plane.bytes; }).toList(), imageHeight: image.height, imageWidth: image.width, // imageMean: 127.5, // imageStd: 127.5, // rotation: 90, numResults: 6, threshold: 0.05, asynch: true);
error i am getting is like below
PlatformException (PlatformException(Failed to run model, Interpreter busy, java.lang.RuntimeException: Interpreter busy
at sq.flutter.tflite.TflitePlugin$TfliteTask.
Can you please help me with this?
It's really hard to detect the issue based on the provided error message. Can you try running example application attached in this repo?
Ok I will try. But the example only contains the object detected over the image not on the camera live frame.
On Fri, Sep 20, 2024 at 7:49 AM Suman Kunwar @.***> wrote:
It's really hard to detect the issue based on the provided error message. Can you try running example application attached in this repo?
— Reply to this email directly, view it on GitHub https://github.com/sumn2u/flutter_tflite/issues/2#issuecomment-2362575346, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALFMYFWVGBPEBRP336OWSS3ZXOA37AVCNFSM6AAAAABONUWJ56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRSGU3TKMZUGY . You are receiving this because you authored the thread.Message ID: @.***>
-- Thanks & Regards Kalpesh Pipaliya | iOS Developer
Tops Infosolutions Pvt. Ltd. Mobile: +91 8460026268 Skype: kalpesh_257
i am facing issue with loading models in android devices. Its working on ios device.
i have implemented below method
initTiflite() async { try { await Tflite.loadModel( model: "assets/yolov2_tiny.tflite", labels: "assets/yolov2_tiny.txt", numThreads: 1, isAsset: true, useGpuDelegate: false, ); print("Model loaded successfully"); } catch (e) { print("Error loading TensorFlow Lite model: $e"); } }
Can you anyone help me with this?