mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

how to reduce the wasm and

Open geniusq1981 opened this issue 1 year ago • 2 comments
trafficstars

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

None

OS Platform and Distribution

window, android, ios

MediaPipe Tasks SDK version

No response

Task name (e.g. Image classification, Gesture recognition etc.)

pose landmarker

Programming Language and version (e.g. C++, Python, Java)

javascript

Describe the actual behavior

use pose landmarker , load .wasm and .task slowly, the file is a little big

Describe the expected behaviour

how to reduce the .wasm file size

Standalone code/steps you may have used to try to get what you need

I only use pose Landmarker, but I found the wasm is suit for all kinds of dectors and its size is over 9Mb, on mobile os, i need to wait a little long time before load it  . So I wonder whether can reduce its size to optimate the loading performance.

Other info / Complete Logs

No response

geniusq1981 avatar Apr 23 '24 08:04 geniusq1981

+1 It takes a lot of time to load on my side as well using the Image Segmenter to remove the background behind somebody. Alternatively, you could use a previous lighter version of the .wasm file. However, you won't have the latest features...

If the MediaPipe team could have a lighter file for each solution that would be great.

edamlmmv avatar Apr 23 '24 15:04 edamlmmv

Hi @geniusq1981,

We believe that providing a lighter file would be beneficial. However, after confirming with the team, we have determined that it is currently not possible to reduce the size of the Wasm file. Additionally, we do not have any plans to provide a lighter version at this time, nor is it on our roadmap. However, we would like to raise the feature request and close the status of it. If there is enough demand, we may consider providing a lighter version in the future.

Thank you!!

kuaashish avatar May 07 '24 07:05 kuaashish

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar May 15 '24 01:05 github-actions[bot]

@geniusq1981 HEY!

Are you encoding the files to gzip? I did and it reduced the download time/speed by more than half.

@kuaashish Perhaps it would be useful to update Mediapipe's documentation so that it's more visible that "Accept-Encoding" includes gzip. I had to inspect the network activity to find out about this. image

edamlmmv avatar May 22 '24 15:05 edamlmmv

Hi @edamlmmv,

To help us effectively address the issue with the title, please submit a new issue including complete error logs and detailed instructions for reproducing the problem. This will enable us to provide a possible solution.

Thank you!!

kuaashish avatar Jun 05 '24 06:06 kuaashish

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Jun 13 '24 01:06 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar Jun 21 '24 01:06 github-actions[bot]

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

google-ml-butler[bot] avatar Jun 21 '24 01:06 google-ml-butler[bot]