mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

How to run segmentation in a Worker

Open berkon opened this issue 1 year ago • 5 comments

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:

image

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:

image

I'm running this all in the renderer process of an Electron app.

berkon avatar May 29 '23 15:05 berkon