mediapipe
mediapipe copied to clipboard
How to run segmentation in a Worker
On the documentation page: https://developers.google.com/mediapipe/solutions/vision/image_segmenter/web_js it is mentioned that segmentForVideo() can also be run in a worker in order to improve performance:
I couldn't find a working example for this. The problem is that importScripts() is not supported in workers, but the mediapipe npm module seems to use this function.Thus I'm getting:
I'm running this all in the renderer process of an Electron app.