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


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

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.