0
$\begingroup$

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);
    }

  • Note: this question was asked on Stackoverflow but I haven't got any answer
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.