hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.14k stars 394 forks source link

fix: WebGL TensorFlow kernel cache keys #340

Closed jmswrnr closed 1 year ago

jmswrnr commented 1 year ago

When compiling image targets using WebGL since v1.2.0 we often get an error: Uncaught (in promise) Error: Operands could not be broadcast together with shapes, which is thrown by the binomialFilter WebGL kernel.

We were able to fix this by updating the WebGL kernel cache keys to include both the width and height, instead of only the width. This is likely because we're using multiple images with different aspect ratios.

Fixes #339