1

I'm working on eye detection project and I have trained my own model using Tensorflow Library, I have now the Tensorflow lite model.

I followed the documentation proposed by Tensorflow for how to integrate custom model MLKit firebase on the Android platform.

This is CustomModelActivity.java that I followed

https://github.com/firebase/snippets-android/blob/a7be1d9b6208d112d1bacbfff937c32c219124b5/mlkit/app/src/main/java/com/google/firebase/example/mlkit/CustomModelActivity.java#L127-L128

I tried to implement this function by setting the image on imageview and I have tried to convert it to bitmap But I have encountered some issue ( false predictions ) on an image from the dataset.

I have posted many questions about this problem but I didn't get any answer.

I would like now to load the image from my gallery and get it, My question is: How can I implement the last function getYouInputImage() ?

 private Bitmap getYourInputImage() {
        // This method is just for show
        return Bitmap.createBitmap(0, 0, Bitmap.Config.ALPHA_8);
    }
abdou_dev
  • 805
  • 1
  • 10
  • 28
  • I don't think that your question has a lot to do with `TensorFlow`. What you need is to load an image from a phone gallery using android API. You can find an answer for that question [here](https://stackoverflow.com/questions/13023788/how-to-load-an-image-in-image-view-from-gallery). – carobnodrvo Sep 03 '19 at 11:23
  • My question is related to Tensorflow because of load image with the right form ( preprocessing ) give good results. – abdou_dev Sep 03 '19 at 13:13

0 Answers0