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

Making tfjs runtime the default #134

Open
ziyuan-linn opened this issue Jun 11, 2024 · 2 comments
Open

Making tfjs runtime the default #134

ziyuan-linn opened this issue Jun 11, 2024 · 2 comments
Assignees

Comments

@ziyuan-linn
Copy link
Member

After discussing with @shiffman, I am creating an issue to start a discussion about potentially switching our default runtime to tfjs instead of mediapipe.

The MediaPipe runtime has been causing some issues:

The TFJS runtime, although slightly worse in performance, seems to be more stable and without the above issues. I think it might be a good idea to set the tfjs runtime as the default for all models and have mediapipe as a more "experimental" option.

Please share your thoughts on this @gohai @MOQN!

@ziyuan-linn ziyuan-linn changed the title Making tfjs runtime the default Making tfjs runtime the default Jun 11, 2024
@gohai
Copy link
Member

gohai commented Jun 14, 2024

I too would pick stability over performance, if the better-performing avenue is having those other drawbacks that impact the experience of folks using it.

Just to share some thoughts on the issues @ziyuan-linn mentioned (in case we want to explore addressing those still):

  • Unable to load two models at the same time: I am wondering if we could work around this with a synchronization mechanism, where the parent ml5 object keeps a promise (or an array of promises) that get fulfilled whenever a model finishes loading? And a helper function that waits for no outstanding promises before returning? This function could be sprinkled in to the classes that need it?

  • Memory leak: those seem to be notoriously hard to get to the bottom of... I'd do the same approach as you already did - checking if this also occurs in tfjs example codes, and filing bugs against them if yes, and seeing if there is anything we're doing differently if not

@shiffman
Copy link
Member

Thank you for the thoughts @gohai! @ziyuan-linn let's go ahead and switch over to tfjs for the upcoming soft launch! We can keep issues open and revisit in the future.

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

No branches or pull requests

3 participants