mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Using MediaPipe's Bazel workspace for compiling OpenCV into WASM

Open prantoran opened this issue 1 year ago • 0 comments

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

Yes

OS Platform and Distribution

Ubuntu 22.04 LTS

MediaPipe version

v0.10.9

Bazel version

6.1.1

Solution

Selfie Segmentation

Programming Language and version

C++

Describe the actual behavior

No response

Describe the expected behaviour

No response

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

Hello! I am experimenting with converting Bilateral filter calculator into WASM and stumbled upon it dependency on OpenCV. I thought about bypassing the dependency in code but the calculator uses OpenCV's bilateral filter and I am not sure of any alternative.

Is there a way for converting OpenCV with Bazel into a portable WASM binary or relevant tutorials? 

I thought about:
1. Compiling OpenCV to wasm using Make 
2. Add the compiled wasm binaries using `preload-file` in Bazel
But I have not done any of the 2 steps before and I am not sure whether the right way.

Other info / Complete Logs

No response

prantoran avatar Jan 06 '24 15:01 prantoran