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

background executor for image Processes #16

Open
henrik-schiller opened this issue May 7, 2024 · 3 comments
Open

background executor for image Processes #16

henrik-schiller opened this issue May 7, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@henrik-schiller
Copy link

On both Android and iOS sides, the UI is blocked if the image processes are heavy. They need to be shifted to a background thread. Simply change executor on Android to background executor.

@yanshouwang
Copy link
Owner

On both Android and iOS sides, the UI is blocked if the image processes are heavy. They need to be shifted to a background thread. Simply change executor on Android to background executor.

I'm sorry that I am focused on another plugin these days, this plugin need a complete rewrite in the future, I sugget to use the official camera plugin for now.

@henrik-schiller
Copy link
Author

I mean, big thanks for making your code public! :) Generally, it's not possible to use the official camera plugin for image analysis because message channels are not made for huge data transfers like stream of images, and there is a memory leak when trying so. For robust image analysis, your approach of doing the image analysis natively and sending the results to Flutter is the way to go, rather than doing the analysis on the Dart side. So I'm sure there is a need for a computer vision-only package in the future. Could you do me a favor and tell me what other issues you had with this plugin? Generally, I would shift the torch logic out of the plugin to keep it more minimal because there is already a torchlight plugin by Flutter. Best regards, Henrik.

@yanshouwang
Copy link
Owner

I mean, big thanks for making your code public! :) Generally, it's not possible to use the official camera plugin for image analysis because message channels are not made for huge data transfers like stream of images, and there is a memory leak when trying so. For robust image analysis, your approach of doing the image analysis natively and sending the results to Flutter is the way to go, rather than doing the analysis on the Dart side. So I'm sure there is a need for a computer vision-only package in the future. Could you do me a favor and tell me what other issues you had with this plugin? Generally, I would shift the torch logic out of the plugin to keep it more minimal because there is already a torchlight plugin by Flutter. Best regards, Henrik.

I need to rewrite it use pigeon or ffi and the image analysis mechanism need to be reconsidered.

@yanshouwang yanshouwang added the enhancement New feature or request label Aug 22, 2024
@yanshouwang yanshouwang moved this to Todo in camerax_android Aug 22, 2024
@yanshouwang yanshouwang moved this to Todo in camerax_ios Aug 22, 2024
@yanshouwang yanshouwang moved this from Todo to In Progress in camerax_android Aug 22, 2024
@yanshouwang yanshouwang moved this from Todo to In Progress in camerax_ios Aug 22, 2024
@yanshouwang yanshouwang self-assigned this Aug 22, 2024
@yanshouwang yanshouwang added this to the 1.0.0-dev.0 milestone Aug 22, 2024
@yanshouwang yanshouwang moved this from In Progress to Done in camerax_android Aug 22, 2024
@yanshouwang yanshouwang closed this as completed by moving to Done in camerax_android Aug 22, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in camerax_ios Aug 22, 2024
@yanshouwang yanshouwang moved this from Done to In Progress in camerax_ios Aug 22, 2024
@yanshouwang yanshouwang reopened this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Status: In Progress
Development

No branches or pull requests

2 participants