tensorflow / tfjs

A WebGL accelerated JavaScript library for training and deploying ML models.
https://js.tensorflow.org
Apache License 2.0
18.48k stars 1.93k forks source link

tensorflow pose-detection estimatePoses first connection slowly #5459

Closed byy01 closed 3 years ago

byy01 commented 3 years ago

It is using pose-detection(blazePose-tfjs) function, and it takes about 6 seconds to receive the result value during the first connection. After that, they quickly receive the results. Is there a way to reduce the first connection time?

rthadur commented 3 years ago

@byy01 the first detection is slow since the backend are caching the shader programs, the prediction after the first one should much faster and stable.You can add a warm up step after the model loads.

byy01 commented 3 years ago

The first time a pose-detection connects, it responds slowly, and the problem is that you can't do anything else on the web while the results are answered. It was the same even if we proceed asynchronously. Is there any other way to proceed with the first response?

rthadur commented 3 years ago

you can check different configuration mentioned here in the documentation https://github.com/tensorflow/tfjs-models/tree/master/posenet#config-params-in-posenetload

google-ml-butler[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.

google-ml-butler[bot] commented 3 years ago

Closing as stale. Please @mention us if this needs more attention.

google-ml-butler[bot] commented 3 years ago

Are you satisfied with the resolution of your issue? Yes No