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

Why using Camera2 API for Android Tensorflow Lite Demo? #22620

Closed
anonym24 opened this issue Sep 29, 2018 · 5 comments
Closed

Why using Camera2 API for Android Tensorflow Lite Demo? #22620

anonym24 opened this issue Sep 29, 2018 · 5 comments
Assignees
Labels
comp:lite TF Lite related issues stat:awaiting response Status - Awaiting response from author

Comments

@anonym24
Copy link

Many manufactures didn't implemented Camera2 that well googlearchive/android-Camera2Basic#123

So it's better to use legacy Camera API even for Android API >= 25

@tensorflowbutler tensorflowbutler added the stat:awaiting response Status - Awaiting response from author label Sep 30, 2018
@tensorflowbutler
Copy link
Member

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
Mobile device

@ymodak ymodak added the comp:lite TF Lite related issues label Oct 2, 2018
@ymodak ymodak assigned aselle and unassigned ymodak Oct 2, 2018
@aselle aselle assigned shashishekhar and unassigned aselle Oct 4, 2018
@aselle
Copy link
Contributor

aselle commented Oct 4, 2018

@shashishekhar so you have any insight on this? I suspect we just used the new API arbitrarily.

@shashishekhar
Copy link
Contributor

@anonym24 : Which manufacturers are you talking about? Do you have an example where the API is correctly implemented by one manufacturer and not implemented by another manufacturer.

@aselle: Camera2 API is the official API, Camera 1 API is deprecated.

@anonym24
Copy link
Author

anonym24 commented Oct 4, 2018

The main issue with Camera2 API that I can't set Full HD resolution for preview (1920x1080), though it can be done with Legacy Camera API (TextureView can be set maximum to 1440x1080)

Proofs:

googlearchive/android-Camera2Basic#123
https://stackoverflow.com/questions/31362202/android-camera2-output-sizes
https://stackoverflow.com/questions/52374888/camera2-1440x1080-is-maximum

I tried some Xiaomi devices and some users reported this problem on Samsung devices (see stackoverflow links) and some others

Seems many phone manufactures (Samsung, Xiaomi, Sony and so on) didn't care about Camera2 that much

@shashishekhar
Copy link
Contributor

@anonym24 : Thank you for the links. This seems like a bad implementation on some particular manufacturers. I hope in future the manufacturers will fix these bugs. Most of our samples are forward looking so we want to support Camera 2 API, rather than Camera 1. This is certainly not a problem with AOSP.

I agree for production use cases, you may have to do workarounds against bugs and may need to use Camera 1 API for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues stat:awaiting response Status - Awaiting response from author
Projects
None yet
Development

No branches or pull requests

5 participants