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

Reconsider default runtime? (mediapipe vs. tf.js) #237

Open
shiffman opened this issue Dec 9, 2024 · 3 comments
Open

Reconsider default runtime? (mediapipe vs. tf.js) #237

shiffman opened this issue Dec 9, 2024 · 3 comments

Comments

@shiffman
Copy link
Member

shiffman commented Dec 9, 2024

I've noticed that almost all end-of-semester final projects, where students typically use just one model, greatly benefit from { runtime: 'mediapipe' }. I wonder if we should reconsider making this the default, paired with clear documentation and instructions for switching to other runtimes when using multiple models. (see #69 #134)

Additionally, there's #225, which could be worth exploring further in this context.

@ziyuan-linn, is there anything I might be overlooking here?

@ziyuan-linn
Copy link
Member

I think mediapipe runtime's memory leak issue is still the main concern. If we do switch over, we would want clear documentation that any long-running projects (in a gallery or show setting for example) should use the tfjs runtime. I am happy to take a look again and investigate whether mediapipe's memory leak has been addressed not.

Additionally, this would be a breaking change. For some models, the options are different depending on which runtime is selected.

@shiffman
Copy link
Member Author

shiffman commented Dec 9, 2024

Ah right, I forgot about the memory leak! Let's continue to leave tf.js as the default then and revisit if/when that is resolved! Can you elaborate on how this is "breaking", I'm having trouble imagining a scenario where that would apply.

@ziyuan-linn
Copy link
Member

Ah I looked through the source code and it would be as big of a problem as I thought. The "breaking" probably only applies to one case: when loading a offline model, a tfjs models require detectorModelUrl and landmarkModelUrl in the options object, but mediapipe models require solutionPath instead.

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

2 participants