am15h / tflite_flutter_helper

TensorFlow Lite Flutter Helper Library
https://pub.dev/packages/tflite_flutter_helper
Apache License 2.0
161 stars 290 forks source link

Add option to input CameraImage directly to the interpreter #21

Open ricardochen opened 4 years ago

ricardochen commented 4 years ago

I'm trying to do predictions with the camera stream which returns a CameraImage. Is there a way to use that instead of converting it to an image first?

am15h commented 3 years ago

If you are asking for a wrapper to directly pass CameraImage as a parameter, instead of using these https://github.com/am15h/object_detection_flutter/blob/master/lib/utils/image_utils.dart, probably we can add that support.

However, the conversion is required in any case, as we need to obtain the Image in a suitable format for performing transformations, obtaining correct byte representation etc.

elephantum commented 3 years ago

+1 for adding helpers for CameraImage

Otherwise, it is a copy/paste everytime between projects