Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebaseVisionImage.fromMediaImage vs fromBitmap #1158

Closed
patolax opened this issue Aug 6, 2020 · 4 comments
Closed

FirebaseVisionImage.fromMediaImage vs fromBitmap #1158

patolax opened this issue Aug 6, 2020 · 4 comments
Assignees

Comments

@patolax
Copy link

patolax commented Aug 6, 2020

Unfortunttely after releaseing the app that was developed on you sample code does not work on most devices. So I am trying to use CameraX or Camera2 apis.

Those api output MediaImage. If I use FirebaseVisionImage.fromMediaImage detection is fast and provide desired performance. However, if I use front camera, FirebaseVisionImage.getBitmap outputs a flipped image.

In order to convert MediaImage to a scaled, rotated and flipped image, I used YuvToRgbConverter.
https://github.com/xizhang/camerax-gpuimage/blob/master/app/src/main/java/com/appinmotion/gpuimage/YuvToRgbConverter.kt

Then output Bitmap is then used in FirebaseVisionImage.fromBitmap method. The detection of this approch is very slow and performane is so poor.

Any reason behind this?

I want to achive the similar performance I got from the smaple camera api, but I want to get the bitmap of correct orientation just like in the sample.

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@samtstern
Copy link
Contributor

@ulukaya @gkaldev should we remove the mlkit samples here and point to the more up-to-dates ones that the Android team is maintaining?

@djj1109
Copy link

djj1109 commented Apr 12, 2021

thanks

@ulukaya
Copy link
Member

ulukaya commented Apr 12, 2021

Firebase ML-Kit SDK is deprecated, please follow the Google ML-Kit at https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants